Let's choose the virtual machine called vcb-backup and perform its backup. Before we proceed, we should stop to explain that VCB is capable of doing two types of backup:
- full backup
- file-level backup
The file-level backup is available for Windows operating systems only. The full backup means to backup virtual machine images. You can use it with every type of virtual machine.
Next thing, we need to remember to choose the right transport mode:
- SAN mode - bypassing VCB proxy via FC or iSCSI SAN (LAN-free backup)
- Hot-Add mode - VCB proxy in a virtual machine
- LAN mode - backup over LAN network
In SAN mode, both ESX host and VCB proxy has to have access to the shared storage. The backup is completely offloaded from the ESX host which provides virtual machine disks and their snapshots only. The whole process is moved to the VCB proxy which reads disks directly from the SAN. The Hot-Add mode is interesting in that way, it is able to access virtual machine disks directly but without the SAN. If the VCB proxy is virtualized, it is hot added virtual machine disks. Nothing suprising, VMware ESX is capable of hot-adding disks to a virtual machine. The drawback is that you need to have one virtualized VCB proxy on each ESX host so that it can backup all virtual machines hosted on them. The LAN mode uses network protocols to access the virtual machine disks. By the way, the SAN mode is supported by VCB and VMware ESX natively. The remaining two modes requires VMware ESX(i) 3.5 or later.
The vcbmounter command is used for virtual machine backup. The following command will initiate a full backup of vcb-backup virtual machine in LAN mode:
0%=====================50%=====================100%vcbmounter -h VC_IP -u VC_USER -p VC_PASS -a name:vcb-backup \The -r parameter defines a directory of backup location. The -m parameter specifies transport mode (available values are san, hotadd, nbd/nbdssl). The directory can't exist. It is created on demand. The command should produce the following output when it finishes:
-r c:\mnt\vcb-backup -t fullvm -m nbd
Copying "[system-raid1] vcb-backup/vcb-backup.vmx":
**************************************************
Copying "[system-raid1] vcb-backup/vcb-backup.nvram":
0%=====================50%=====================100%
**************************************************
Copying "[system-raid1] vcb-backup//vmware.log":
0%=====================50%=====================100%
**************************************************
Converting "c:\mnt\vcb-backup\scsi0-0-0-vcb-backup.vmdk" (compact file):
0%=====================50%=====================100%
**************************************************
As you can see, the VCB proxy is copying virtual machine disks to the defined local storage. More precisely, the ESX host provides virtual machine snapshots to the VCB proxy which copies them to the local storage (you can check it with snapshot manager - there will be a snapshot called _VCB-BACKUP_). After that, you can backup them with your favorite backup software. Or you can access them with mountvm command.
2 comments:
Finally someone demistifies it. Ever other egghead overcomplicated the topic. You done well to make it simpler. Cheers.
It's too bad that VCB is being discontinued after vSphere 4.1 - it is a really nifty tool!
I developed the basic usage you described further into a script that queries a host (or vCenter server) for a list of VMs and backs up each in turn using vcbMounter. Have a look, while it's still relevant :)
http://www.zerosignal.co.uk/2010/09/kixtart-vcb-vmware/
Post a Comment