Article ID: 6322, created on May 13, 2009, last review on Feb 16, 2016

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux 4.7
  • Virtuozzo hypervisor

Backup overview

Virtuozzo / Virtuozzo hypervisor comes with a new feature in the Virtuozzo family: backup and restore tools. The feature allows you to make copies of virtual servers so that these copies may be used to restore the original state in case of any data loss event. It is important to note that backup and restore are unified tools and are allowed to deal with Virtual Machines (VM) and Containers (CT) residing on Virtuozzo Server.

The backup operation is available for four VM statuses: running, stopped, suspended, paused.

There are three possible scenarios for storing backups:

  • On the local server
  • On a remote Virtuozzo Server
  • On a network share

The local backup storage is configured to be located in the /var/parallels/backups/ folder.

Backup and restore locally

The following command is used to back up a virtual server locally:

# prlctl backup <vm_id|vm_name>

(where vm_id is the virtual machine identifier and vm_name is the virtual machine name)

Example:

# prlctl backup {248e9848-2169-4aa6-bfbf-c53c3db5c752}
# prlctl backup 'Test Server' 

To list existing backups of a given VM, the following command should be used:

# prlctl backup-list  <vm_id|vm_name>

Example:

# prlctl backup-list 'Test Server' 

To restore a VM from a backup, the below given command is used:

# prlctl restore {<vm_id> | -t,--tag <backup_id>}

If backup_ID is not specified, the latest backup version will be restored.

Example:

# prlctl restore {72a28a66-dac9-4e0a-9202-78301fad1e2e} -t {3e547fd5-4c4d-4a76-8b5d-8b7b3182df55}
# prlctl restore {72a28a66-dac9-4e0a-9202-78301fad1e2e}

Backup and restore using remote Virtuozzo Server

Storing backups of VMs on a different Virtuozzo Server rather than locally makes the backup/restore scheme more reliable and unaffected by disk failure on the server where the VMs are hosted.

The following command and options can be used to back up a virtual machine to a remote Virtuozzo Server:

# prlctl backup <vm_id|vm_name> [-s,--storage <user:passwd]@server[:port]>]

(where vm_id is the virtual machine identifier and and vm_name is the virtual machine name; -s,--storage is an option pointing to the remote server IP and login details)

Example:

# prlctl backup 'Test Server' -s root:password@192.168.1.2:/var/parallels/backups

To list existing backups of a given VM, use the following command:

# prlctl backup-list <vm_id|vm_name> [-s,--storage <user:passwd]@server[:port]>]

Example:

# prlctl backup-list 'Test Server' -s root:password@192.168.1.2

To restore a VM from a backup, the below given command is used:

# prlctl restore [<vm_id> | -t,--tag <backup_id>] [-s,--storage <user:passwd]@server[:port]>]

If backup_ID is not specified, the latest backup version will be restored.

Example:

# prlctl restore {248e9848-2169-4aa6-bfbf-c53c3db5c752} -s root:password@192.168.1.2

To create a new virtual machine from a backup of some other machine, just specify the new name:

# prlctl restore {248e9848-2169-4aa6-bfbf-c53c3db5c752} -s root:password@192.168.1.2 -n mynewvm

Please note that the network settings are restored as is, therefore network-related configuration settings should be changed, like MAC addresses of NICs and assigned IP addresses. This is to avoid conflicts with the existing (and possibly running) virtual machine.

Backup and restore using network share

Storing backups of VMs on a network share allows you to use remote backup storage as local. To achieve that, the network share is mounted to the /var/parallels/backups folder on Virtuozzo Server and VMs are backed up in exactly the same way as they would be locally. Below are examples of commands for mounting NFS and SMB shares to the /var/parallels/backups folder:

NFS shares are mounted on Virtuozzo Server using the mount command. The format of the command is as follows:

# mount -t <nfs-type> -o <options> <host>:</remote/export> /var/parallels/backups

Example:

# mount -t NFSv3 192.168.1.2:/remote/share1 /var/parallels/backups

To mount a Samba share to the backups directory, execute the following command as root:

# mount -t cifs  //<servername>/<sharename> /var/parallels/backups -o <username>,<password>

Example:

# mount -t cifs //192.168.1.2/share1 /var/parallels/backups -o administrator,password

Related topics

120753 How to browse/restore files or folders from the VM's backup?

Search Words

restore backup

backups

prlctl backup

vm recovery

Timeout

how to restore backup file to new Virtual machine?

prlctl restore

Restore virtual machine

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 0c05f0c76fec3dd785e9feafce1099a9

Email subscription for changes to this article
Save as PDF