XenServer Backup Options – Part I

In this first of a two part series, we’ll discuss available options for XenServer Backup.

Citrix Xen ServerRecently, I have been asked about backing up XenServer Virtual Machines (VMs).  At first I was concerned that some of the people who asked have had a XenServer environment for a long time.  At this point, they already had backup solutions in place.  In essence, they were looking for something different.  More to the point, they were looking for a single backup solution that encompassed all their backup needs.  With that in mind, we can look at what is out there.  I am going to discuss the solutions I have familiarity with.  If I do not include a solution, it is not because I am excluding it or devaluing it.  If you know of a solution I do not mention, please post it in the discussions with a description of the product and tell me what you like about it.

Citrix (and others) categorize XenServer Virtual Machine backups into three types; Cold, Warm, and Hot backups.  These are also terms for disaster recovery and high availability, but they take on a slightly different meaning when referring to XenServer backups.  Cold and Warm backups refer to backups that cause service interruption.  A cold backup occurs when the VM is powered down completely.  A Warm backup will not power down the VM, but can still interrupt service while the VM is being backed up.  A Hot backup is one that will not interrupt service and keep the VM running.  The performance of the VM may be affected during a Hot backup, but the VM will still be able to respond to requests.

Let’s discuss backing up the XenServer host itself.  I have found very little need for a purchased solution to back up my XenServer Hosts.  The metadata on a host changes rarely and to install XenServer on a server literally takes only a few minutes.  Therefore, all I need to do is backup the metadata for the host from time to time.  I can accomplish this with command line tools.  Backing up a host server needs the ‘xe host-backup’ command.  To restore a host server, it takes a few steps.  First, install XenServer and run the ‘xe host-restore’ command using the file created from the backup command.  Then, you will need the XenServer install CD to run a ‘Restore from Backup’.  This can be scripted and works fine for individual hosts, but most times, we have a pool of multiple hosts.  You can still use the commands I discussed to make a host backup, but you need to use the ‘xe pool-dump-database’ command to back up the pool metadata.  You would then use the ‘xe pool-database-restore’ command to restore the pool metadata.  Again, scripting can help with these tasks.

Now, let’s talk about your basic XenServer VM backup options.  For immediate needs, you can export a VM, take a snapshot, or utilize existing server backup technology.  Exporting a VM and taking snapshots can be automated, but neither of them are true backup solutions providing resolution to backup strategies.  In fact, it is highly recommended to view snapshots as a temporary solution, not a full backup strategy.  Snapshots are categorized as a Hot Backup.  Snapshots will eat up your storage very quickly.  So will VM exports.  One cheap method of backup is to take a snapshot of a running VM, export the snapshot to an .XVA file, and then delete the snapshot.  Besides from storage utilization issues which get worse in big environments or growing environments, there a many other drawbacks to this method like automation problems, file level restoration complications, retention over time/restore point tracking, etc.

In part II of this post, I will discuss Hot backup solutions utilizing agents and options from multiple third party vendors.

As always, please post any questions or suggestions below. I look forward to hearing from you.

AZS-3
Craig R. Kalty (CCIA, CCEE, CCA, MCITP:EA, MCITP:SA, VCP)
Sr. Network Consultant
Craig.Kalty@CustomSystems.com

 

 

 

© 2014 Custom Systems Corporation