Free ESX virtual machine backup software ( GhettoVCB )

GhettoVCB is a VMware community software that allows you to take a snapshot based backup of virtual machines running VMware ESX( vShpere) servers. You don't need any special VMware licenses or licensed backup software.

This Software used ESXi tech support shell commands to create/clone VMDK files of VMs. Since it uses vmware shell resources, you may have some slowness or impact to ESXi shell access during backup. But if your are small business or a LAB environment this is very negligible. 

More details can be found in Author's  ( William Lam) GitHub page. 

Let's move on to steps for installing and configuring GhettoVCB backup. 

This tool currently supports ESX 3/4/5/6/7 versions. If you are using latest ESXi 7 versions , make sure you don't have secure boot disabled in server BIOS. 

1. Download Ghetto VCB from below github site.

2. Upload this vib to ESXi datastore. 

3. Enable Secure Shell ( SSH) 

4. Log on to ESXi SSH using your favourite shh client. ( i.e Putty for Windows. ) 

5. Execute command " esxcli software vib install -v

Note : Make sure you replace highlighted path with your volume and vi file name. 

You might get below error in you have EFI secure boot enabled in your server BIOS.

" VIB is not Compliant with the Image Profile acceptance level partner"

6. Once successfully installed you will see below message in screen. It doesn't requires any reboots. 

7. You can run " esxcli software vib list |grep -i ghettovcb" to get installed ghettoVCB softwae version. 

8. Once installed, you can find configuration, backup and restore template files under "/etc/ghettovcb/" directory. William suggest to use ghettoVCB.conf file for backup customisation.
But with this option you have to specify configuration file details each time you run backup command. To avoid this i have decided to edit actual script/command code.

9. Actual backup and restore script are located under "/opt/ghettovcb/bin/" directory.

10. But you won't be edit these files directly, So copy file to a different name, will you this file for customisation and running backups. To copy this file run 

11. Now edit copied script ( with your favourite shell editor (i.e  VI or VIM or Nano)

Modify below highlighted sections in script file. 

a) VM_BACKUP_VOLUME  -- Volume or datastore, where you want to store your VM backup files. Make sure this file system has enough space to hold all your backups.  

# directory that all VM backups should go (e.g. /vmfs/volumes/SAN_LUN1/mybackupdir)

b) VM_BACKUP_ROTATION_COUNT -- Number of backups you want to retain, In my case i used "7" , Considering running a backup once in a day, Seting up value 7  allows me to retain seven days worth of backups. 

# Number of backups for a given VM before deleting

12. Now test your script by running a backup against a single small VM

"./opt/ghettovcb/bin/ -m VMname"

When backup completes successfully, you will see message like in below screenshot. 

Note : Do not enable compress option for large VMs, this might cause performance impact on ESXi shell resource. 

you may be able to use onscreen log information or specify a customised log location in script file. 

13.  During backup , Script automatically creates a folder for each VM in VMname and stores all backups updater it. 

14. If you want to restore any backup, Just copy files from preferred backup folder to your live datastore and register VM using VMX file. 

For More details watch below video :

Courtesy  : William Lam

Post a Comment