Hi there,
I´am writing a script for using VCB with TSM..
I have a little problem. I want to make full backup images of the virtual machines, but at the moment, the vmdk files are splitted into 2GB parts.
I want that the vmdk files are in the original size.. I already looked at the parameters of vcbmounter.exe, but it is not working..
This is the actual line in my script:
vcbmounter.exe -h vcserver -u vcuser -p vcuserpw -a ipaddr:servertobackup -r g:\mnt\xxx\vm-full -t fullvm -m san
In the help of vcbmounter, it is shown:
Export Flags:
-M: If set, the disk is exported into a single (monolithic) file.
When turned off (default), the disk is split into multiple 2GB files.
But it´s not working, or I set it in the wrong place..
May someone please help??
Thank you ..
Don't you need to add "-M 1" (without the quotes)?
hm ok, but at which position?
looks good! thank you!
Here is a simple VB script that I wrote for VCB/TSM. It has some basic error reporting and dynamically builds the VM backup string from an enter-delineated file "VMs.txt" within the "baclient" directory. Just replace "yourdomain.com" with your domain suffix. Hope this helps!
Option Explicit
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim strVCBFile
Dim strErrorFileName
Dim strErrorLog
Dim strVCBList
Dim strPreCmd
Dim strJobName
Dim strDay
Dim strMonth
Dim strYear
Dim strStream
Dim objFSO
Dim objShell
Dim objFile
Dim objErrorLog
Dim objStream
strVCBFile = "VMs.txt"
strErrorFileName = "VMerrors"
strPreCmd = "pre-command.bat"
strJobName = "VMBackup"
strVCBList = ""
strDay = Day(Date)
strMonth = Month(Date)
strYear = Year(Date)
strErrorLog = (strErrorFileName & " " & strMonth & "-" & strDay & "-" & strYear & ".txt")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Wscript.Shell")
If objFSO.FileExists(strErrorLog) Then
set objErrorLog = objFSO.OpenTextFile(strErrorLog, ForAppending)
Else
set objErrorLog = objFSO.CreateTextFile(strErrorLog, ForAppending)
End If
If objFSO.FileExists(strVCBFile) Then
Set objFile = objFSO.GetFile(strVCBFile)
Set objStream = objFile.OpenAsTextStream(ForReading, TristateUseDefault)
Do While Not objStream.AtEndOfStream
strStream = objStream.readline
strStream = Trim(strStream)
strStream = strStream & ".yourdomain.com"
If reachable(strStream) Then
strVCBList = strVCBList & " " & strStream
Else
objErrorLog.writeline (strStream)
End If
Loop
objShell.Run (strPreCmd & " " & strJobName & strVCBList),,True
Else
End If
function reachable(HostName)
Dim objExecObject
Dim strText
reachable = false
set objExecObject = objShell.Exec("cmd /c ping -n 1 -w 100 " & HostName)
Do while not objExecObject.StdOut.AtEndOfStream
strText = objExecObject.StdOut.ReadLine()
If Instr (strText, "Reply") > 0 Then
reachable = true
exit do
End If
Loop
end function