VMware Cloud Community
Dav_s
Contributor
Contributor

vcbRestore

I'm referring to "Virtual Machine Backup Guide"

( http://www.vmware.com/pdf/vi3_vm_backup.pdf ) and it says to use vcbrestore.exe to restore a backup VM by vcb. I've looked everywhere on the backup proxy server that has the vcb installed on it and I can't find vcbRestore.

Thanks.

Reply
0 Kudos
18 Replies
sherold
Expert
Expert

I checked an older beta version of VCB and the utility is there. It seems to have been left out of the GA release of VCB. Don't know if there is a particular reason. If you want to restore a VCB image backup, you will need to manually copy files and re-import using vmkfstools on the ESX3 host at this point.

Scott

-Scott ________________________ http://www.vmguru.com http://www.thevesi.org
Reply
0 Kudos
rogerh
Enthusiast
Enthusiast

I'm not using VC, so I can't be sure of this, but are you supposed to use vcbRestore on the VCB proxy? I thnk that if you are using the VCB proxy you are supposed to be using VC to do the restore.

The section about using vcbRestore refers you to the "using the Service Console to Back Up and Restore Virtual Machines" chapter.

I.e. if you go to the host where you want to restore the Virtual Machine you should be able to run something like:

eval `ssh-agent`

ssh-add

vcbRestore -h localhost -u [/code]

If you are restoring to a different ESX host, you will also need to create a copy of the catalog file on the local ESX host and modify it according to the instructions in the PDF. I also had to change the host entry in that file to the hostname of the server I was restoring to, which isn't mentioned in the documentation as far as I can tell. Then you add the following to the vcbRestore command:

-a [/code]

All this presumes that you have generated an SSH id on the ESX host and put the public key for that Id in the authorized_keys2 file on the remote server.

You will also need to check that the TEMP_DIR (as specified in /etc/vmware/backuptools.conf) has enough free space to store the contents of the backup directory. If you partitioned the ESX host with a separate /tmp partition that may not be the case; I'm using a spare VMFS volume mounted as /vmfs/volumes/backups.

Roger

Reply
0 Kudos
jkstewie
Contributor
Contributor

I am having similar issues. I dont see anyway (documented) to restore virtual machines at an image level using the vcb proxy (with backup exec). I did a search on my esx 3 host and could not find a file named vcbrestore.exe...

Reply
0 Kudos
jkstewie
Contributor
Contributor

I found vcbRestore, but it doesnt seem to be an executable...

Message was edited by:

jkstewie

Reply
0 Kudos
admin
Immortal
Immortal

vcbRestore is for use from the service console to restore fullvm backups made using vcbMounter. This is not the same thing as using a VCB proxy and doesn't actually require a VCB license!

The vcb proxy is for file level backups, not machine level. Thus the restores are also file level. There are two methods of restoring from the proxy:

Restore the files directly back to your VM using a CIFS/SMB share from the VCB proxy.

Install an agent inside your VM and restore using your backup software.

Both methods require the VM to be running, and I beleive both methods strip file attributes such as file permissions.

Yes, VCB is currently pretty rubbish if you ask me!

Personally I think you are best off not spending your money on a VCB license and instead using the free tools vcbMounter and vcbRestore to hot-backup the VMs to a network share, just like vmsnap/VMBK did in ESX2.5.x.

I've writted a script to automate backups using vcbMounter if youre interested:

#!/bin/bash

#

\# Filename: vm-smb-backup.sh

\# Author: Alex Mittell

\# Version: 0.1a

\# Date: 7/9/2006

\# ESX3.0 SMB Backup Script

\#

\# chmod 700 this file to prevent non-root access to passwords

#

\# schedule from /etc/cron.d as root or from roots crontab

#

\#### variable definitions ####

\#### If passwords contains special characters put them in single quotes

mountdir=/mnt/backup

remotedir=backup

smbserver=smb.domain.com

smbuser=backup

smbpass=password

host=VC.domain.com/esxhost.domain.com

searchtype='powerstate:on'

tempdir=/tmp

user=administrator/root

password=password

#

#

#########################################################################

#start script

#########################################################################

\#### Mount SMB backup folder ####

if test ! -e "$mountdir" ; then

mkdir $mountdir

fi

mount -t smbfs -o username=$smbuser,password=$smbpass //$smbserver/$remotedir $mountdir

if \[ $? -ne 0 ]; then

echo "SMB MOUNT UNSUCCESSFUL - EXITTING" >> $tempdir/errors.log

exit

fi

\#### Determine what VMs are on this host ####

for i in `/usr/sbin/vcbVmName -h $host -u $user -p $password -s powerstate:on | grep ipaddr: | awk -F: '\{print $2}'`

do echo $i >> $tempdir/hostVMs.txt

done

\#### Check excluded VM list and create list of VMs to backup####

\#### Put VM IP addresses in excludedVMs.txt to stop them being backed up

if test ! -e "$tempdir/excludedVMs.txt" ; then

touch $tempdir/excludedVMs.txt

fi

sort -f -o $tempdir/excludedVMs.txt $tempdir/excludedVMs.txt

sort -f -o $tempdir/hostVMs.txt $tempdir/hostVMs.txt

comm -2 -3 $tempdir/hostVMs.txt $tempdir/excludedVMs.txt > $tempdir/backupVMs.txt

\#### Backup non-exluded VMs ####

cat $tempdir/backupVMs.txt |

while read vmip

do vmname=`nslookup $vmip | grep name | awk -F'= ' '\{print $2}' | awk -F. '\{print $1}'`

echo Backing up VM....

echo $vmname #print what host we're working on

echo $vmip

if test -e $mountdir/$vmname-old; then

rm -rf $mountdir/$vmname-old #remove old backup

fi

if test -e $mountdir/$vmname; then

mv $mountdir/$vmname $mountdir/$vmname-old #archive previous backup

fi

/usr/sbin/vcbMounter -h $host -u $user -p $password -a ipaddr:$vmip -r $mountdir/$vmname > $mountdir/$vmname.log

if \[ $? -ne 0 ]; then

echo "Backup FAILED for $vmname with the following errors:" >> $mountdir/errors.log

fi

cat $mountdir/$vmname.log | grep Error >> $mountdir/errors.log

done

\#### Clean up temporary files ####

rm -f $tempdir/hostVMs.txt

Reply
0 Kudos
arisaperstein
Enthusiast
Enthusiast

This is what I have done with VCB. I mounted a VMDK to the VCB server using the following command-line

vcbmounter -h NAMEOFVCSERVER -u USERNAME -p PASSWORD -a ipaddr:ADDRESSOFGUEST -r d:\mnt\ADDRESSOFGUEST-DATE -t fullvm -m san

Note the ADDRESSofGUEST-DATE in the name of the folder. If the folder exists aldready vcbmounter will give you an error.

the process took roughly 9 minutes to copy the contents of a 10GB VMDK

When the vcbmounter was done, I ended up with the following files in the directory

10/27/2006 02:44 PM 988 catalog

10/27/2006 02:44 PM 8,664 ADDRESSOFGUEST.nvram

10/27/2006 02:44 PM 1,891 ADDRESSOFGUEST.vmx

10/27/2006 02:52 PM 2,136,539,136 scsi0-0-0-ADDRESSOFGUEST-s001.vmdk

10/27/2006 02:52 PM 2,145,452,032 scsi0-0-0-ADDRESSOFGUEST-s002.vmdk

10/27/2006 02:52 PM 1,268,842,496 scsi0-0-0-ADDRESSOFGUEST-s003.vmdk

10/27/2006 02:52 PM 1,607,270,400 scsi0-0-0-ADDRESSOFGUEST-s004.vmdk

10/27/2006 02:52 PM 2,133,917,696 scsi0-0-0-ADDRESSOFGUEST-s005.vmdk

10/27/2006 02:52 PM 1,900,544 scsi0-0-0-ADDRESSOFGUEST-s006.vmdk

10/27/2006 02:52 PM 628 scsi0-0-0-ADDRESSOFGUEST.vmdk

10/27/2006 02:52 PM 57 unmount.dat

10/27/2006 02:44 PM 14,930 vmware-15.log

10/27/2006 02:44 PM 22,499 vmware-16.log

10/27/2006 02:44 PM 55,381 vmware-17.log

10/27/2006 02:44 PM 15,121 vmware-18.log

10/27/2006 02:44 PM 15,121 vmware-19.log

10/27/2006 02:44 PM 25,972 vmware-20.log

10/27/2006 02:44 PM 101,875 vmware.log

I then copied these files to a directory I created on the VMFS-3 partition called restore/_r_ADDRESSOFGUEST/

I then completly deleted this guest from the VI3 host.

i then ran vcbRestore -h NAMEOFVCSERVER -u USERNAME -p PASSWORD -s /vmfs/volumes/VOLNAME/restore/_r_ADDRESSOFGUEST -L 6

This restored the entire guest as it was from the time I took the snapshot. It then registered the VM with the host server and it appeared moments later in VC. The -L 6 is just for verbose logging.

For added fun, I manipulated the catalog file and parts of the ADDRESSOFGUEST.vmx file to create a new host called ADDRESSOFGUEST-dr. I did this to demonstrate that you could use the backup to create a clone of a system. Why you ask. Well, I was running a process on a VM when the entire guest OS (Windows 2003) froze completly. I took a VCB backup and restored it to another machine name then put it on a different vSwitch and booted the VM to see what had happened. So I was able to troubleshoot a completly dead guest by creating a new bootable version of the frozen guest.

Also for fun, I rebooted the guest several times while the VCB was taking the vmdk snapshot and it didn't effect the process at all. I also rebooted the VCB server in the middle of taking a snapshot. Now the VCB server and the snapshot were disconnected from each other. I found that if I deleted the snapshot using VC, things duidn't return to normal. So I ran vmware-cmd config.vmx -removesnapshots and the snapshots went away and the guest was none-the-wiser.

Now I will admit I had to figure a lot of this out on my own because the documentation isn't that great. I also see a lot of confusion because vcbRestore is not on the VCB server as an executable but as a program on the VI3 host that needs to be run from the CoS.

Reply
0 Kudos
kix1979
Immortal
Immortal

Just to add on a little more, there is no vcbRestore for Windows. vcbMounter.exe on the window side mounts the LUNs as read only. As such there is NO way to write data back to the LUNs and you must copy the files down to an ESX host and run vcbRestore from there.

Thomas H. Bryant III
Reply
0 Kudos
vmteam1
Contributor
Contributor

Remember, ESX hosts are Linux based, so executable files won't have a .exe extension - that's a Windows thing.

Try just searching for vcbRestore (and remember that Linux filenames are case sensitive)

Reply
0 Kudos
chris_gardner
Contributor
Contributor

This is what I have done with VCB. I mounted a VMDK

to the VCB server using the following command-line

vcbmounter -h NAMEOFVCSERVER -u USERNAME -p PASSWORD

-a ipaddr:ADDRESSOFGUEST -r

d:\mnt\ADDRESSOFGUEST-DATE -t fullvm -m san

Note the ADDRESSofGUEST-DATE in the name of the

folder. If the folder exists aldready vcbmounter will

give you an error.

the process took roughly 9 minutes to copy the

contents of a 10GB VMDK

When the vcbmounter was done, I ended up with the

following files in the directory

10/27/2006 02:44 PM 988 catalog

10/27/2006 02:44 PM 8,664

ADDRESSOFGUEST.nvram

10/27/2006 02:44 PM 1,891

ADDRESSOFGUEST.vmx

10/27/2006 02:52 PM 2,136,539,136

scsi0-0-0-ADDRESSOFGUEST-s001.vmdk

10/27/2006 02:52 PM 2,145,452,032

scsi0-0-0-ADDRESSOFGUEST-s002.vmdk

10/27/2006 02:52 PM 1,268,842,496

scsi0-0-0-ADDRESSOFGUEST-s003.vmdk

10/27/2006 02:52 PM 1,607,270,400

scsi0-0-0-ADDRESSOFGUEST-s004.vmdk

10/27/2006 02:52 PM 2,133,917,696

scsi0-0-0-ADDRESSOFGUEST-s005.vmdk

10/27/2006 02:52 PM 1,900,544

scsi0-0-0-ADDRESSOFGUEST-s006.vmdk

10/27/2006 02:52 PM 628

scsi0-0-0-ADDRESSOFGUEST.vmdk

10/27/2006 02:52 PM 57 unmount.dat

10/27/2006 02:44 PM 14,930 vmware-15.log

10/27/2006 02:44 PM 22,499 vmware-16.log

10/27/2006 02:44 PM 55,381 vmware-17.log

10/27/2006 02:44 PM 15,121 vmware-18.log

10/27/2006 02:44 PM 15,121 vmware-19.log

10/27/2006 02:44 PM 25,972 vmware-20.log

10/27/2006 02:44 PM 101,875 vmware.log

I then copied these files to a directory I created on

the VMFS-3 partition called

restore/_r_ADDRESSOFGUEST/

I then completly deleted this guest from the VI3

host.

i then ran vcbRestore -h NAMEOFVCSERVER -u USERNAME

-p PASSWORD -s

/vmfs/volumes/VOLNAME/restore/_r_ADDRESSOFGUEST -L 6

This restored the entire guest as it was from the

time I took the snapshot. It then registered the VM

with the host server and it appeared moments later in

VC. The -L 6 is just for verbose logging.

For added fun, I manipulated the catalog file and

parts of the ADDRESSOFGUEST.vmx file to create a new

host called ADDRESSOFGUEST-dr. I did this to

demonstrate that you could use the backup to create a

clone of a system. Why you ask. Well, I was running a

process on a VM when the entire guest OS (Windows

2003) froze completly. I took a VCB backup and

restored it to another machine name then put it on a

different vSwitch and booted the VM to see what had

happened. So I was able to troubleshoot a completly

dead guest by creating a new bootable version of the

frozen guest.

Also for fun, I rebooted the guest several times

while the VCB was taking the vmdk snapshot and it

didn't effect the process at all. I also rebooted the

VCB server in the middle of taking a snapshot. Now

the VCB server and the snapshot were disconnected

from each other. I found that if I deleted the

snapshot using VC, things duidn't return to normal.

So I ran vmware-cmd config.vmx -removesnapshots and

the snapshots went away and the guest was

none-the-wiser.

Now I will admit I had to figure a lot of this out on

my own because the documentation isn't that great. I

also see a lot of confusion because vcbRestore is not

on the VCB server as an executable but as a program

on the VI3 host that needs to be run from the CoS.

I'm trying to do this myself and am stuck on:

"I then copied these files to a directory I created on the VMFS-3 partition called restore/_r_ADDRESSOFGUEST/"

How do you do this? Do you mount the folder from the Windows proxy using smbmount or something? I'm totally confused as to how you get the files back onto the ESX server to complete the restore.

Reply
0 Kudos
Samcer
Expert
Expert

you have to copy those files via Secure copy from windows to ESX (see winscp or veeam)

my 2 cents

Sam

samcer| http://about.me/samcer | http://www.vm-support.it/ | @samuelecerutti
Reply
0 Kudos
bertdb
Virtuoso
Virtuoso

the vcbproxy runs windows 2003, and the VCB utilities on that host do have the .exe extension ...

Reply
0 Kudos
Schorschi
Expert
Expert

vcbRestore as an EXE in Windows existed and was take away in one of the early beta/RC versions of VCB. It is NOT part of VCB for Windows. This command is specific to the ESX 3 core, COS. We backup and restore directly to the VMFS volumes, the snapshot data, which is cold when the NetBackup tasks run.

Yes VCB is junk... I needs real work. But VMware is working on it.

One of the issues that really bugs me... is that in some configurations, running vcbMounter in Windows... multiple times concurrently, generates errors and crashes the snapshots. This is horrible. You really need VCB running to the highest extent possible in Windows... if you have very large VMs. VMware has acknowledged that they think they have found the issue, but we don't have an ETA on a timeline for it.

Reply
0 Kudos
beneddt
Contributor
Contributor

Hey Guys,

Just found a pretty slick solution for this (we really don't want anyone logging into the Service Console for anything, let alone restoring a VM).

The latest version of VMware Converter enterprise, released in late April, will import VCB backups. I tried it last night and it works like a champ. Provides GUI based restores based upon your rights in VC, allows you to restore to any ESX host and VMFS volume, and even lets you customize the VM before the restore happens. The best part is you can run it right from the VCB proxy.

If your running ESX Enterprise, once license of converter enterprise is included for free.

The only issue is speed. I assume it's doing the restore over the network to the ESX host via SCP in the background. I had a 12GB VM, which only took 5 minutes to backup over the SAN via VCB take just over 2 hours to restore over the network. But, given the infrequency of a total VM restore, I can definitely live with that...

thanks,

-dean

Reply
0 Kudos
sacker
Contributor
Contributor

Speed.. i'm currently trying to restore fullVM VCB backups..

tried to copy via SCP in order to do a vcbRestore... 6,5 Gb seems to take more than 10 hours...

WinScp is really slow tooo...

Is that normal ?

A little precision : VCB fullVM backup is for me a way to export vmdks for DR purpose.. but if i need to paln 6 days for restoring 3 VMS, that makes no sense.

Has anyone experience on that subject ?

Thank you very much

Reply
0 Kudos
HarisB
Contributor
Contributor

I just did restore of 3 VCB-backedup VMs using Converter 3.0.1, it took 12 minutes to transfer 6.2 GB from physical backup server to ESX host, both on gigabit network. I was running Converter from the backup server, otherwise network traffic goes through my desktop at 100Mbit/s. I was getting average speeds of around 150MBit/s during this transfer (slow for gigabit network, but I never got better here, don't know why).

Maybe it's WinSCP, but try to remove bottlenecks and see how it works using this method.

Reply
0 Kudos
brianb1
Contributor
Contributor

Definitly a WINSCP issue.. I have used for years and copies are extremely slow using WINSCP.. try other methods like FTP or other.

Reply
0 Kudos
pmorrison
Enthusiast
Enthusiast

Try Veeam FastSCP. It is written just for ESX and is 10 times faster than WinSCP when using it agains ESX boxes.

Reply
0 Kudos
poweredbyotgc
Contributor
Contributor

Here is how I handle vcbRestores, I run Windows 2003 R2 on my VCB Proxy and I share my restore directory as an NFS share, Then either from a command prompt mount that shares, run vcbRestore -h vcenterserer -u username -p password -s /mnt/point/directory

You can also create an shared NFS datastore in virtual center, just modify your -s option

vcbRestore -h vcenterserver -u username -p password -s /vmfs/volumes/NASSTORE/directory

I have restore a guest that has 3 80GB vmdks (240GB) in 6 hours, mind you that both vcbproxy and esx has bonded 1GB nics

Reply
0 Kudos