VMmanager: Backup configuration

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM ->BACKUP SYSTEM
VMmanager Cloud ->BACKUP SYSTEM

VMmanager KVM and VMmanager Cloud have a built-in backup system that allows to back up the control panel and virtual machines.

General information

The backup system is very flexible. You can back up all virtual machines or only several machines that VMmamager administrator selects. Backups can be made on a local disk, or FTP-storage, or to multiple storages at the same time.

Make sure that the master server and cluster nodes have enough disk space which equals the maximum number of disks of one virtual machine.

For example, the largest virtual machine in the cluster has two disks, 100 Gb and 10 Gb. For successful backup make sure that the mater server and cluster node have at least 110 GB of free disk in partion space where the backup temporary directory will be made.

Only administrator can create and restore backup copies.

Virtual machines are backed up one after another. Other machines are added into the queue. During the backup process or when machines are waiting for backup, operations with disks (connect/disconnect) and migration are forbidden. The virtual machine will be suspended during the backup process.

Execute the command to see a queue of virtual machines

/usr/local/mgr5/sbin/mgrctl -m vmmgr backup.plan -o xml

Making a backup copy of a virtual machine

The backup process includes the following steps

  1. The system makes the dump of VM XML-description;
  2. If the virtual machine is enabled, the system makes the memory dump;
  3. Virtual disks of the virtual machine will be copied on the cluster node where the VM is created:
    1. the system will make the disk snapshot for storages that support an external snapshot (LVM and RBD). The virtual machine will be suspended during this process.
    2. qcow2 disks will be converted into RAW using the qemu-img utility in the backup temporary directory;
  4. The xml-description, memory dump and disk copies are copied from the temporary directory on the cluster node to the master server through the network. The backup copy is also made into the temporary backup directory;
  5. The data on the master server will be added into the TAR-archive and copied to the backup storage;
  6. The temporary directories are cleared, and the backup copy is made for the next virtual machine.

Temporary directories

The temporary directory on the cluster node where the system converts and copies the disk, is defined by path remotetmp of the configuration file (/usr/local/mgr5/etc/vmmgr.conf). The default value is "/tmp".

The temporary directory on the master server to which the backup copies from the cluster nodes are copied, is defined by path BackupTmpDir. The default value is "tmp/.vmmgr-backup".

Please note: you cannot specify the same directory for path remotetmp and path BackupTmpDir. The control panel clears the temporary directories from time to time, that's why we don't recommend that you use the directory with critical data as the temporary one.

Configuring the backup plan

Navigate to Backups -> Backup plans -> Settings to set the general backup settings.

Backup settings
  • Temporary directory — enter the backup directory on the master server to which the backup copies from the cluster nodes will be copied;
  • Timeout — Set the maximum timeout in minutes for data preparation (virtual machines).