VMware Cloud Community
PKaufmann
Enthusiast
Enthusiast
Jump to solution

VCB BackupScript

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 ..

0 Kudos
1 Solution

Accepted Solutions
cheeko
Expert
Expert
Jump to solution

vcbmounter.exe -h vcserver -u vcuser -p vcuserpw -a ipaddr:servertobackup -r g:\mnt\xxx\vm-full -t fullvm -m san -M 1[/b]

View solution in original post

0 Kudos
5 Replies
cheeko
Expert
Expert
Jump to solution

Don't you need to add "-M 1" (without the quotes)?

PKaufmann
Enthusiast
Enthusiast
Jump to solution

hm ok, but at which position?

0 Kudos
cheeko
Expert
Expert
Jump to solution

vcbmounter.exe -h vcserver -u vcuser -p vcuserpw -a ipaddr:servertobackup -r g:\mnt\xxx\vm-full -t fullvm -m san -M 1[/b]

0 Kudos
PKaufmann
Enthusiast
Enthusiast
Jump to solution

looks good! thank you!

0 Kudos
bjmoore
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos