VMware Cloud Community
NicholasKellam
Contributor
Contributor

VCB Config issues

I am getting the following error when attempting to use the vcb prescan scripts on one of our proxys:

BACKUPROOT is not set, defaulting to C:\mnt PORT is not set, defaulting to 443

I have checked the config.js file and it is pointing to the correct staging dircetory and the ports are correct. I've stared out the items that are sensitive.

/*

  • Generic configuration file for VMware Consolidated Backup (VCB).

*/

/*

  • Directory where all the VM backup jobs are supposed to reside in.

  • For each backup job, a directory with a unique name derived from the

  • backup type and the VM name will be created here.

  • If omitted, BACKUPROOT defaults to c:
    mnt.

  • Make sure this directory exists before attempting any VM backups.

*/

// BACKUPROOT="S:
VMDK";

/*

  • URL that is used by "mountvm" to obtain the block list for a

  • disk image that is to be mounted on the backup proxy.

*

  • Specifying this option is mandatory. There is no default

  • value.

*/

HOST="********.**.net";

/*

  • Port for communicating with all the VC SDK services.

  • Defaults to 443

*/

// PORT="443";

/*

  • Username/password used for authentication against the mountvm server.

  • Specifying these options is mandatory.

*/

USERNAME="commvault";

PASSWORD="*********";

/*

  • TRANSPORT_MODE determines how VCB accesses virtual disk data.

  • Currently, two modes are supported on Windows:

*

  • +) "san"

  • Virtual disk data is read directly off a shared storage device

  • that that the virtual disk resides on. This requires VMFS

  • storage on SAN or iSCSI and the storage device has to be

  • accessible from both ESX and the VCB proxy.

  • +) "nbd"

  • In this mode, VCB will use an over-the-network protocol to

  • access the virtual disk. Data is read from the storage device by

  • the ESX host and then sent across an unencrypted network channel

  • to the VCB proxy.

  • Please note that this mode does not provide the offload

  • capabilities of the "san" mode (since data is still transferred

  • from the ESX host across the network). However, "nbd" does not

  • require shared storage and also enables VCB to be run inside a

  • virtual machine.

  • +) "nbdssl"

  • This mode is same as "nbd" except that the data transfered over

  • the network is encrypted. The data transfer in "nbdssl" mode can

  • be slower and use more CPU than in the "nbd" transport mode. The

  • "nbdssl" mode will fail when connecting directly to ESX 3.0.x

  • or VC 2.0.x host.

*

  • The default option is "san".

*/

// TRANSPORT_MODE="san";

/*

  • The log level determines the amount of log output generated by VCB.

  • Valid ranges are from 0 (least verbose) to 6 (most verbose), with a

  • default setting of 3. Change this setting to 6 when troubleshooting.

*/

// LOGLEVEL=2;

/*

  • SNAPSHOT_POLICY determines how disk snapshots for backup are being created:

  • +) "automatic"

  • A snapshot is being generated automatically by the Interoperability

  • Module right before backup and it is being removed

  • automatically right after backup.

  • +) "manual" -

  • Exactly one snapshot named "_VCB-BACKUP_" must already exist for

  • each protected VM. The snapshot is mounted/unmounted on the proxy,

  • but the snapshot is neither created nor deleted by VCB.

  • This can be used to have external tools manage the backup snapshot.

  • +) "createonly"

  • The Interoperability Module will create the snapshot for each VM

  • right before it gets backed up, but will not remove the snapshot

  • after unmounting.

  • +) "deleteonly"

  • The Interoperability Module assumes that the snapshot named

  • "_VCB-BACKUP_" has been created beforehand. The snapshot will be

  • deleted automatically after backup.

*

  • The default option is "automatic"

*

*/

//SNAPSHOT_POLICY="automatic";

/*

  • The criteria to be used to identify a virtual machine

*

  • +) ipaddr

  • VMs are looked up based on their DNS name/IP address.

  • +) name

  • VMs are looked up based on their name as shown in VirtualCenter.

  • Note that backup will fail for VMs with non-unique names.

*

  • The default option is "ipaddr". You should only change this

  • if you have multiple sets of VMs with the same IP address, but with

  • different names.

*/

//VM_LOOKUP_METHOD="name";

/*

  • Behavior for a backup job when the VM mount point already exists.

  • +) fail

  • A pre-existing mountpoint is causing a backup job to fail

  • +) delete

  • Attempt to remove the pre-existing mount point (and backup

  • snapshots associated with it). If this op. fails, fail

  • the backup job.

*

  • The default option is "fail"

*/

//PREEXISTING_MOUNTPOINT="delete";

/*

  • Behavior for backup job when a previous backup snapshot of a virtual

  • machine already exists.

*

  • +) fail

  • A pre-existing backup snapshot is causing a backup job to fail

  • +) delete

  • Attempt to delete the pre-existing backup snapshot. If the

  • backup snapshot can be deleted without errors, proceed with

  • the backup job. Otherwise fail the backup job.

*

  • the default option is "fail"

*/

//PREEXISTING_VCB_SNAPSHOT="delete";

/*

  • Number of times an operation is re-tried after it fails.

  • You might want to use this option if you see a large number

  • of backup jobs fail with "resource busy" errors.

*

  • Usually, backup software will retry failed jobs, but it

  • might be hours until the backup software retries.

*

  • By default, retry is disabled (set to 0).

*/

//MAX_RETRIES=5;

/*

  • Number of seconds to wait before retrying a failed

  • operation. The default value is 10 seconds.

*

  • If you change this default, you probably also want to change

  • the default for MAX_RETRIES (since this setting only matters

  • if MAX_RETRIES is larger than 0).

*/

//BACKOFF_TIME=30;

*****************************This is the script we are using for pre-scan, which is working fine on one proxy but not the other.******************************

REM - Arguments supplied: vcb-prescan.bat

REM - VMNAME = %1, opt = %2

REM - This script runs before the file scan of the VCB subclient. It

REM - mounts a crash-consistent snapshot of the VM and allows it to be

REM - backed up by commvault.

REM - Set the commandline args - vm name is 1, fullvm/file opt is 2

set vmname=%1

set vmopt=%2

REM - Set the options - backupdir, logdir, utilites dir, etc.

set backupDir=S:\VMDK

set logdir=
atlcvmaster01\vcblogs

set utildir=C:\unixutils

REM - Set the date and time that the script is run

FOR /F "tokens=1-3 delims=/" %%a IN ('%utildir%\dateu +%%m/%%d/%%Y') DO SET varDate=%%c-%%a-%%b

FOR /F "tokens=1-3 delims=/" %%a IN ('%utildir%\dateu +%%H/%%M/%%S') DO SET varTime=%%a:%%b:%%c

REM - name the logfile

set logfile=%logdir%\%vmname%-%varDate%.log

REM - remove directory in backupDir if it exists

echo --- Begin VCB Mount --- >> %logfile%

echo Date: %varDate% %varTime% >> %logfile%

echo Checking for stale backups for %vmname% >> %logfile%

IF %2==fullvm (

REM - If the backup is a fullvm and it exists, remove it.

IF EXIST %backupDir%\%vmname%-fullVM (

echo - Found stale backup, removing... >> %logfile%

rd %backupdir%\%vmname%-fullVM /S /Q

)

) ELSE (

IF %2==file (

REM - if the backup is file-based, unmount it first.

IF EXIST %backupDir%\%vmname% (

echo - Found stale backup, removing... >> %logfile%

REM - Change directory to the VCB framework directory

C:

cd "\Program files\VMware\VMware Consolidated Backup Framework\generic\"

echo ================= UNMOUNT OUTPUT ================= >> %logfile%

cscript post-command.wsf "c:\program files\vmware\vmware consolidated backup framework" "%vmname%" >> %logfile%

echo =============== END UNMOUNT OUTPUT =============== >> %logfile%

IF NOT ERRORLEVEL 0 goto failure

)

) ELSE (

REM - If we don't offer fullvm or file as a backup option, throw an error.

echo Bad backup type option. Please use 'fullvm' or 'file' as the backup option. >> %logfile%

echo Usage: vcb-prescan.bat VM-Name fullvm/file >> %logfile%

goto end

)

)

REM - Change directory to the VCB framework directory

C:

cd "\Program files\VMware\VMware Consolidated Backup Framework\generic\"

REM - Begin VCB snapshot and mount

echo Beginning VCB snapshot and mount... >> %logfile%

echo ================= VCB OUTPUT ================= >> %logfile%

cscript pre-command.wsf "C:\program files\vmware\vmware consolidated backup framework" "%vmname%" %vmopt% >> %logfile%

echo =============== END VCB OUTPUT =============== >> %logfile%

IF ERRORLEVEL 0 goto end

REM - if there is an error in the VCB cscript, throw error.

:failure

echo There was an error during the VCB mount. Please see the VCB output above. >> %logfile%

echo If there was a stale backup found, there could be a stale snapshot blocking the VCB snapshot from completing. >> %logfile%

:end

echo --- Batch Execution Complete. --- >> %logfile%

Any help on this issue would be great. Let me know if you need me to post more information.

-Nicholas

Tags (1)
0 Kudos
5 Replies
depping
Leadership
Leadership

why is the line for the backuproot changed and divided over 2 lines, while it's still marked is a comment?

Duncan

My virtualisation blog:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
NicholasKellam
Contributor
Contributor

That was a formatting issue that was done with the paste of the text. In the config.js file it is BACKUPROOT="S:
VMDK"

0 Kudos
NicholasKellam
Contributor
Contributor

For what ever reason, it keeps happening with the double " \ "

This is what its set to BACKUPROOT="S"
VMDK";

Hopefully this will be in the right format.

0 Kudos
NicholasKellam
Contributor
Contributor

Ok. So i think ive got my answer. The double forward slashes were commenting out the commands. I'm not sure how those got there but removing them should do the trick. Thanks for the help.

0 Kudos
depping
Leadership
Leadership

did you use a decent editor to edit config.js? notepad is not the right tool for this. use something like notepad++

Duncan

My virtualisation blog:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos