VMware Cloud Community
Soyerbean
Contributor
Contributor
Jump to solution

How do you restore your backups back onto your ESXi server

Hi there, I am getting to grips with ESX 3.5i by playing with it (VMWare Rocks!) and I am on the subject of backup and recovery at present. Now I have configured a VCB Proxy which can connect to my ESXi server and backup my VM files (VMDK files etc) which I then backup using our chosen backup program (well those that are on shared storage anyway - more on this later).

Now my question is, how do you get those back onto the ESXi server should I need to? The documentation talks about using a Common Internet File System (CIFS) remote-access file sharing protocol on page 44 of the VM Backup guide but that doesn't tell me much. It also talks about using vcbrestore.exe but I don't have that on my VCP Proxy (where do I get this and what can it do for me?).

The only way I have found to do it so far is by using the VMWare Convertor which uses the VMDK files from my VCB Proxy and connects to the ESXi server directly and creates a new VM Server for me. Now that's nifty but it doesn't seem a very straight forward way to recover to me (there must be other ways).

And finally while VCB Backups need you to have shared storage (SAN/NFS) what do you do if you are using internal storage on a server which is also running ESXi server? Is there no way of backing these up using VCB? And how do you back these up at the VMDK file level?

I thought about perhaps sharing the internal disks via NFS which I could then connect to from my VCB Proxy but this doesn't appear to be supported or documented any where and I dont think an NFS server daemon is enabled in ESXi server. So experts out there any assistance would be most welcomed.:)

0 Kudos
1 Solution

Accepted Solutions
elazar
Enthusiast
Enthusiast
Jump to solution

Your welcome :). I actually use that method(vmkfs -i) to backup my VMs. I run ESXi at home on a PowerEdge 1800, and I cannot run another box to run backups via the RCLI or VCB, so I run a shell script on my ESXi host which backs up my VMs to a second drive and then I copy the files via NFS(using WSfU) to a removable drive. See http://communities.vmware.com/message/1084212#1084212.

elazar

View solution in original post

0 Kudos
8 Replies
rlund
Enthusiast
Enthusiast
Jump to solution

first you unlock the console, ( this would be unsupported ) http://ernestelf.spaces.live.com/blog/cns!50811F3490D13C0A!163.entry

Then you can use the scp command from a linux box to connect in copy the files where you want to, or using somthing like winscp for windows.

Then you would browse the datastore on the ESXi box, and right click on the *.vmx file and click add to inventory, name it and so forth.

Roger Lund Minnesota VMUG leader Blogger VMware and IT Evangelist My Blog: http://itblog.rogerlund.net & http://www.vbrainstorm.com
Soyerbean
Contributor
Contributor
Jump to solution

Hi rlund thanks for reply. I didn't know about the 'add to inventory' trick! but knew about enabling ssh. Yet this now raises another question. I know that the VCB backup breaks the vmdk file down into 2GB chunks. So now the files look different. Having copied them back and done the 'add to inventory' I am then presented with the 'keep or create new uid' pop up message. Wow it all looked promising. However sadly which ever I chose the machine will not start. It fails with 'A file was not found' error. And the event log says 'cannot find the virtual disk "testvm-000001.vmdk" which looking at the disk doesn't exist. Do I need to manually manipulate some of the config files to get this to work?

0 Kudos
rlund
Enthusiast
Enthusiast
Jump to solution

Soyerbean,

First look and see if there is a disk like testvm-000001.vmdk or close, then you can either rename the disk, or edit the *.vmx and *.nvram and then change testvm-000001.vmdk to whatever the new filename is.

Now the 2 GB chunks is another issue, you can try to use vmware converter to get this back into esx format. see the link http://communities.vmware.com/message/588351

You could also try the 1st step in this post, which is using vmware server or workstation's tools to convert disk types http://hamed.dk/home/53-vm-ide2scsi+ +

Roger Lund Minnesota VMUG leader Blogger VMware and IT Evangelist My Blog: http://itblog.rogerlund.net & http://www.vbrainstorm.com
elazar
Enthusiast
Enthusiast
Jump to solution

Hi Soyerbean,

I believe VCB uses the 2gbsparse format for

backups, you should be able to convert the disks back to thick or thin via vmkfstools

on the ESXi host itself(ESXi cannot read 2gbsparse). If you see <vmname>.vmdk along with a bunch of <vmname-s000n>.vmdk files, then the following should work:

vmkfstools -i <location of source vmdk> <new vmdk name>

elazar

admin
Immortal
Immortal
Jump to solution

Odd answer, sorry -- but why not use VMWare Convertor, it imports to Smiley Wink

0 Kudos
Soyerbean
Contributor
Contributor
Jump to solution

Hi all, thanks for your help so far. I guess I just didn't think having to use the VMware convertor to get a backup re-imported onto the ESXi server seemed very straight forward (and you had to re-import into a new vm rather than over writing the original) however according to the documentation thats how you are supposed to do it. I will also try the method suggested by elazar about using the vmfstools -i <location of source vmdk> <new vmdk name>.

Now another question, in the vm Backup book page 36 says that VCB now supports backing up over the lan so you can backup ESXi vm hosted on internal disks. Now I have made the changes to the config.js file as it says to do so changing the TRANSPORT_MODE from the default san to nbd (Network Block Device) however this doesn't appear to be working and my vcb backup fails with the usual error of not being able to find the disk...

"C:\Program Files\VMware\VMware Consolidated Backup Framework\vcbMounter.exe" -h 10.1.1.6 -u root -p ******** -t fullvm -r "c:\esx-backups\cacti server" -a uuid:564dfef4-2583-c123-63e0-31f3f7a1958c

No path to device LVID:4899bcd9-25d1ea87-bc2d-001ec9cff2cb/4899bcd9-1f71e059-fee2-001ec9cff2cb/1 found.

Error: Failed to open the disk: Cannot access a SAN/iSCSI LUN backing this virtual disk. (Hint: If you are using vcbMounter you can use the option "-m ndb" to switch to network based disk access if this is what you want.) If you were attempting file-level access, stop the vmount Service by typing "net stop vmount2" on a command prompt to force vmou

nt to re-scan for SAN LUNs and re-try the command.

An error occurred, cleaning up...

Deleted directory c:\esx-backups\cacti server

Any one got this to work? Have any tips? Thx

0 Kudos
Soyerbean
Contributor
Contributor
Jump to solution

Hi elazar, you Rock!! Your suggestion worked so there is infact two ways to get VCB backed up files back onto your ESXi server.

1/ Use VMware converto

2/ Copy the files onto the ESXi server and then run the following command which takes the 2GB files and creates you a single vmdk file in the format that ESXi espects and wants.

vmkfstools -i <location of source vmdk> <new vmdk name>

And finally after reading all the VMware Backup docs I could find, have now discoverd that you can backup vm's which are located on internal disks (not SAN or NFS) buy using the latest version VCB and using the following command (note the all important -m switch)

C:\>vcbmounter -h 10.10.8.26 -u root -p password -t fullvm -r "c:\esx-backups\TestXP-VM" -a uuid:564d253e-bf1d-a184-f0d2-15d76b1fc448 -m nbd

This then uses the Network Block Device which basically transfers the vm's off of your ESXi internal disk over the network. Obviously this takes a lot longer than the shared storage configuration but it works!! And if you want the data to be encrpted along its flight then swap ncb to ncpssl (or see page 37 of the "Virtual Machine Backup Guide (ESX Server 3.5, ESX Server 3i version 3.5)"

Thanks to all for their help and elazar if you post again I will mark your question as the answer so you get the points! Thx for ur help.

0 Kudos
elazar
Enthusiast
Enthusiast
Jump to solution

Your welcome :). I actually use that method(vmkfs -i) to backup my VMs. I run ESXi at home on a PowerEdge 1800, and I cannot run another box to run backups via the RCLI or VCB, so I run a shell script on my ESXi host which backs up my VMs to a second drive and then I copy the files via NFS(using WSfU) to a removable drive. See http://communities.vmware.com/message/1084212#1084212.

elazar

0 Kudos