UPDATE: we are now supporting Delta Backup! (aka Incremental backup). Check our blog post about using incremental backup with XenServer.
UPDATE 2: now it's time for even better: continuous incremental backup!
Few days ago, we released the 4.2 version of Xen Orchestra, the web interface for XenServer.
One of the feature was the Scheduler for rolling snapshots. It means:
- create a schedule (every nights at 4:00 AM, every week but not Sat/Sun etc.)
- select the VMs you want to snapshot (one or multiples VMs, on various pools)
- choose the snapshot depth (i.e: how many snapshot before deleting the old one: the rolling mechanism)
But snapshots aren't "real" backup: if you lose your storage or your XenServer host, you lose everything. The goal was more to allow easy rollbacks, like a "time machine".
Anyway, the next step was perfectly natural: schedule full VMs exports!
Let's build it!
Full VM exports
Our first intention is to provide a way to export all the data needed to restore a VM from scratch, even on a brand new XenServer infrastructure. That's a clear step toward Disaster Recovery.
That's why we'll use the XVA format in the first place: it contains all the VM metadata (name, RAM, vCPUs, networks, disk configuration...) + all the VM data (disks). And by compressing by default, the file size will be at worst of the currently used disk space, not more.
And because we can export to a remote share (NFS), even if your complete infrastructure is destroyed, you can restore everything by a simple VM import!
In order to achieve this goal, you need two things:
- an export scheduler
- a mount point manager
This was the trivial part: we are using the previous mechanism for snapshots. This view is accessible in the "Schedule" section:
Example with a daily VM export (as seen in the screenshot below):
- file export name will have the "daily" tag (easier to manage)
- export only the VM named "Salt Master" (running on lab1)
- XO will remove the oldest file if there is already 3 previous exports (rolling backup)
- the exported file will be in
- the schedule will be created as soon as we clicked on "Save" (just under, not visible in this screenshot)
- the schedule will start the export every day at 04:00 AM (with a preview of "when")
Because fully exported VMs can be massive, we need to choose where we want to do it. And the next release of Xen Orchestra will have a mount point manager, allowing to mount directly within the web interface:
- a local path on the file system (if you have enough space or you chose to mount an external drive or whatever you like)
- a remote NFS share
That's the first options available for the 4.3 when it's out, but we could add more possibilities later (SMB for example, SSHFS maybe?). Popular demand will drive this.
Stay tuned for the new 4.3 release this month :)