Problem solve Get help with specific problems with your technologies, process and projects.

VCB – Backup all running VMs

This is a little one line batch file that will backup every running VM on VC.

Last week I was given a little one line batch file that will backup every running VM on VC. This is it here:

for /f “tokens=2 delims=:” %%i in (‘vcbvmname -h virtualcenter.rtfm-ed.co.uk -u administrator -p password -s Powerstate:on ^| find “name:”‘) do @rd /s /q “D:\Backups\All\%%i” &vcbmounter -h virtualcenter.rtfm-ed.co.uk -u administrator -p password -a name:”%%i” -r “D:\Backups\All\%%i” -t fullvm > “D:\Backups\All\%%i.log”

Use the vcbvmname command to search for just the VMs that currently powered on. It then pipes that information to the vcbMounter command to start a FullVM style backup. The progress of each backup is recorded in the LOG files for each VM.

Pretty neat for a 1-line batch file.

This was last published in September 2007

Dig Deeper on VMware Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchServerVirtualization

SearchVirtualDesktop

SearchDataCenter

SearchCloudComputing

Close