(C)SEP AG
Copyright 1999-2011 by SEP AG. All Rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.
Contents |
Currently XEN does not have a backup API. That means, that Xen virtual machines can not be backed up online with using the existing XEN tools. An effective way to perform a useful backup is to use LVM (Logical Volume Manager) as an intermediate layer between physical disk and the file system. Using the LVM presents the opportunity to back up a virtual XEN machine with an LVM snapshot. This LVM snapshot can be mounted into the file system and then written to disk or tape with SEP sesam as a path-backup.
Note, you should also backup the VM configuration files in the directory /etc/xen. On Linux systems it makes generally sense to backup the complete /etc directory.
| Attention |
|
Please note that neither Xen nor LVM are part of SEP sesam software. Further information can be found in the literary references at the end of the document or generally on the Internet. |
| Attention |
|
This scenario presents one example. The dimensioning of the size of the Logical Volumes (LVs)depends on the virtual machine and the applications that run on this system environment. |
In this example the virtual machine VM1 on the XEN host astronomix is stored on the logical volume (LV) /dev/system/xenvm. This partition is mounted to /srv/xenvm. The files of the VM vm1 are stored in the directory /srv/xenvm/vm1.
A snapshot volume must have at a minimum the size to handle all the changes performed by the virtual machine during the time of the backup. In this case the snapshot is created with the size of 1 GB.
The snapshot is introduced via the device file /dev/system/vmbackup to the XEN hostsystem.
| Attention |
|
|
Now the snapshot is mounted into the filesystem to /mnt/vmbackup:
After the backup is finished, the snapshot can be dismounted with:
...and deleted with:
For the restore of a virtual machine its...
For better automation the points "create snapshot" and "mount snapshot" are embedded in a pre-process before backup and the "unmount snapshot" and "delete snapshot" after backup in a post-process.
The definition of the pre- and post-process are done via script on the sesam client which performs the backups. In this case it is the XEN host. Therefore the interface-templates sbc_pre and sbc_post from directory /opt/sesam/skel/templates have to be copied to /opt/sesam/bin/sesam and edited accordingly .
Here are the summaries of the data are shown as an example. The error correction is rudimentary and can be adapted as required.
sbc_pre
sbc_post
Create a backup task via the SEP sesam GUI. As backup source the mountpoint is specified on which the snapshot is mounted at this moment (/mnt/vmbackup).
On the tab Options 1 the check boxes for the pre- and post-processing before and after the backup have to be set. The options are so chosen, that the backup terminates if a failure occurs during the pre-process because of the possibility that either the snapshot is not created or was not mounted. The post-processing (post) in contrast, will also be performed if the backup itself returns an error. This ensures that after the backup the cleanup task works, i.e. dismount snapshot and delete snapshot, are properly executed.
The scenario above describes the backup of the entire virtual machine, that means the VM is backed up as a container. For a selective backup of parts of the virtual machine (from inside), the virtual machine is handled like a physical machine. This means that every VM is its own IP host and, therefore, a sesam client has to be installed on this machine and configured in the SEP sesam environment. Afterward a selective backup can be performed for that virtual machine.
Our sales team would be happy to assist you!
Browse and discover videos by SEP.