Backups in VMmanager OVZ

From ISPWiki
Jump to: navigation, search

This article walks you through the steps you need to perform to make a backup copy and recover a container from that copy.

The backup subsystem requires the rsync utility on the cluster node and master-server. A temporary directory on the master-server is used during the backup process. /usr/local/mgr5/var/.vemgr-backups is used by default; you can change the directory in the configuration file by changing the value of the BackupTmpDir parameter, for example:

path BackupTmpDir /tmp/backups

Making a backup copy

  1. Create backup storages.
  2. Create one or several backup plans (the section "Backups --> Settings"). Select a storage and period for a newly created backup plan.
  3. For creating a backup plan, you need to configure one or several filters, each filter having a list of containers (all or select).
  4. Backups will be made automatically based on the cron job, or manually (select a backup plan and click "Start"). The corresponding background task will be created, the task is put in the queue, i.e. only one backup copy for one container is created. This allows to decrease both server load and requirements to free disk space on the temporary directories.

Recovering container from the copy

You can use the following methods for backup recovery:

  1. From the list of backup copies select one or several plans and click the "Recover" icon. All of the containers specified for that backup plan will be restored.
  2. From the list of saved backups (you can select it from the main menu or in the list of backup copies by clicking the button "Data"). Select a specific container for recovery.

If the container you want to recover does not exist in the database, it will be created; please note - the parameters "cluster node" and "user" on the recovery form are applied only for new containers.

Note the "Behavior" field on the recovery form: selecting "Drop existing data", will not recover containers from the backup copy; selecting "Delete the existing data" will recover the existing containers.