Updated Citrix XenServer 5.5 Automatic VM Backup Scripts

I have re-written the popular Citrix XenServer 5.5 Automated Live VM Backup scripts from scratch, with some big improvements:

  • Separate backup configuration script – So you don’t need to touch the key execution and function scripts to configure backups.
  • VDI removal – Run in addition to the standard vm-uninstall command to stop snapshotted VMs allocating all your disk space
  • Logging – Enable/disable functionality with more advanced function logging and file path customisation.
  • Backup VM selection – The facility to select between all, running, none and specifically set (by VM uuid) virtual machines.
  • Quiesce snapshots – To take advantage of the quiesce snapshot functionality if the VM supports it.
  • HA disabled – High availability is disabled on exported virtual machines to stop configuration issues when re-importing.

This is a complete re-write from scratch and as such is relatively untested other than on my systems – please provide feedback regarding any successful or problematic installations.

The latest release of the updated Citrix XenServer Backup Scripts can be downloaded from http://www.andy-burton.co.uk/files/xenserver_backup/xenserver_backup.tar.gz as a tar gzip archive.

Installation instructions:


[root@xs /]# mkdir /home/backup
[root@xs /]# cd /home/backup
[root@xs backup]# wget http://www.andy-burton.co.uk/files/xenserver_backup/xenserver_backup.tar.gz
...
23:45:25 (12.9 MB/s) - `xenserver_backup.tar.gz' saved [3181/3181]
[root@xs backup]# tar -xzf xenserver_backup_3.0.tar.gz
[root@xs backup]# chmod 700 vm_backup.*
[root@xs backup]# ./vm_backup.sh
[root@xs backup]# nano vm_backup.log

Open and edit vm_backup.cfg to configure the backup.

Run vm_backup.sh to run the backup process, this script does not need to be modified.

The virtual machine backup functions are located in vm_backup.lib and do not need to be modified.

As usual, all comments, negative, neutral or positive are all very welcome.

For those that require it, I will write additional information and a more detailed installation procedure in due course.

Update Log:

Citrix XenServer 5.5 Automated Live VM Backup to Windows CIFS Share

Up until now reliably backing up virtual machines from any of the free virtualisation hypervisors has been either expensive or impossible.

With the launch of Citrix XenServer 5.5 you can now not only take VM snapshots of live servers without shutting them down and taking them offline, you can also export these snapshots including the hard drive disk data to a template file. Continue reading