Using VCB to backup all VM’s

I recently heard a horror story about someone losing all of their VM’s, and decided to revisit VCB to grab a fresh copy of all my vcenter VMDK’s.  It took some remembering, so here it goes:

  1. Download and install VMWare Consolidated Backup.
  2. Open a command prompt and navigate to where you installed VCB.
  3. Make a folder to store your VMDK’s.
  4. Run the following command:
    for /f "tokens=2 delims=:" %%i in ('vcbvmname -h VCENTER.SERVER.FQDN -u USERNAME -p PASSWORD -s any ^| find "name:"') do vcbmounter -h VCENTER.SERVER.FQDN -u USERNAME -p PASSWORD -a name:"%%i" -r "DRIVELETTER:\FOLDER\%%i" -t fullvm -m nbd > "DRIVELETTER:\FOLDER\%%i.log"

References:

Advertisements