HOW TO backup ESX 3.0.1 with
This nice perl script allows online backup of Virtual Machines to a remote FTP/SMB/NFS
It was written by Massimiliano Daneri, and many other authors contributed
it can be downloaded from here

How to install it:

Download and copy to a the ESX server using WinSCP, copy to /etc/vmbk
Login via SSH into the ESX server:
# cd /etc/vmbk
# bash
Runing the script from /etc/vmbk/ it will work, since the dependencies are in these folders.
usage: -h | -d directory |-f |-B |-G
DESCRIPTION: is a script for creating ESX disk snapshot.
It supports disk copy to local host disk or remote Disk with NFS / SMB / FTP can be used on guest powered or on guest unpowered. support batch and interactive use. search about ‘backup’ option on vm guest definition file ,the option may have 4 value NONE , MANUAL , AUTO , ALWAYS if NONE no backup is possible, if MANUAL is possible only interactive mode (-i option) , if AUTO backup is always done.
If backup isn’t finding, it’s equivalent to AUTO.
You can choose also to set SCSIx:y.BACKUP for permit or not a single disk backup, the value are the same NONE , MANUAL , AUTO
You have also the possibility to define various backup session
Example cmd:
#perl -f ftp=’′,dir=’/’,user=’backup’,password=’123′,passive=’true’ -R -l /var/backup_vm.log -v 5
Backup Step-by-Step:
1.Set the ESX firewall to allow outgoing FTP
Enter on the VI go to server>Configuration>Security Profile> Select FTP Outgoing port 21
Also you should define some Port Range for PASSV settings I set CommVaultStatic (8400-8403)
In the FTP Client like Fillezila (these ports must be the same)
In case you have trouble, always check the ftp from the prompt, try transfering data. Create also a user/permission/folders etc…
2.List all current VM:
#perl -f ftp=’′,dir=’/’,user=’1′,password=’1′,passive=’true’ -i
Make note of the number of each server.
3.Backup Servers via FTP
#perl -f ftp=’′,dir=’/’,user=’backup’,password=’vmvmvm’,passive=’true’ -R -l /etc/vmbk/backup_vm.log -v 6

Restore Step-by-Step:

It is not posible (at least with ESX 3.0) to import via Vmware Converter Utility.
So the way I do to restore the VM is:
1. Copy the .vmdk and .vmx files you need to restore using WinSCP to the ESX server
2. Browse the datastorage and register the .vmdk
(any problems with these please leave a comments)

Tags: , , , , , , ,

1 thought on “Howto backup ESX

Leave a Reply

Your email address will not be published. Required fields are marked *