Jun 9, 2010

How To Restore a VMWare VCB Backup

Yesterday I gave you a script on how to perform regular VCB snapshots of your VMWare virtual machines to backup to external storage. Pretty cool right? I mean in the case of a disaster, being able to restore an entire VM could save your hours if not days of time. Think about it, in an old school server scenario, you would have to purchase a new server, install the OS to create a shell, and restore the data on top of that. How long can that take? Imaging being able to just stand up a box and power it back on? That is basically what VCB does for you!

The method I gave you yesterday isn’t a raw snapshot of your VM. by that I mean you can’t just copy it back to your VMWare environment, re-add it to inventory and power it on. The reason is that VCB snapshots your disk into pieces, and creates a catalog file of those pieces so it ca be restored correctly. This also allows the VCB files to traverse your network more efficiently. So how do you restore it?

vmware-logo

Well, you can mount the SMB share where you saved it, or you can do what I do. I copy the files back using WinSCP. When they are copied back to a drive, or LUN that VMWare can see, I use the vcbRestore utility to re-build the vmdk, and to add it back into inventory in vSphere. The command you run is:

vcbRestore -h FQDN.ofyourvsphereserver.com -u user -p password -s VMWareFolder/ -a VMWareFolder/catalog

In the example above change FQDN.ofyourvsphereserver.com to match the FQDN of your vSphere server. Change the user and password to a user and password with full permissions to vSphere. Change VMWareFolder to the folder name of the VM you are restoring.

When you run that you should see something like this:

Converting "/vmfs/volumes/LUN/VMWareFolder/Server.vmdk" (VMFS (flat)):
0%=====================50%====================100%
*********************************************

When that is done, you will see your machine back in inventory in vSphere waiting for you to power it back on!

Technorati Tags: ,,,



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam