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:
- Download and install VMWare Consolidated Backup.
- Open a command prompt and navigate to where you installed VCB.
- Make a folder to store your VMDK’s.
- 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"