8.4. Managing Backups on Virtual Environment Level¶
A regular backing up of the existing virtual environments is essential for any virtual environment reliability. Any virtual environment is defined by its operating system files, applications installed, configuration files, and personal information. Virtuozzo Automator allows you to back up all these components.
For a virtual environment that has been backed up, a table describing its backups is displayed:
Column |
Description |
---|---|
Backed Up |
The date and time when the backing up was performed. |
Backup Node |
The physical server where the backup is stored. |
Size |
The size of the backup. |
Description |
The description of the backup. |
Backup Type |
Denotes if it is a full, incremental, or differential backup. An incremental backup stores not all the files and settings of the virtual environment at the given period of time, but only the changes the virtual environment has undergone since the last backup. A differential backup saves the data changed after the last full backup. Note You can create differential backups only for Virtuozzo 6 containers. |
To sort out the backups, click the Show Search link, enter the date and time of the backup creation, other parameters of the backups you need to display, and click Search.
To show or hide columns, click Select Columns and set or clear the respective checkboxes.
With the help of the action links above the table you can manage your backups on this page in the following ways:
The New Backup link begins the process of backing up the current state of the virtual environment, be it running or not. Virtuozzo Automator places the backup of the virtual environment onto one of the physical servers registered in Virtuozzo Automator that was set as the default backup storage space.
The Renew Backup link allows you to replace a full backup of a virtual environment and all its dependent incremental backups with a new full backup. You renew a full backup by selecting the check box opposite the corresponding date and clicking the Renew Backup button. Only full backups can be renewed and only one at a time.
The Restore Virtual Environment link allows you to restore a single virtual environment backup selected in the table.
The Remove Backups button removes the virtual environment backups currently selected in the table. Usually this is done to provide extra space for making new virtual environment backups. Use the check box at the upper left corner to select/deselect all the backups at once.
Clicking on a backup date in the table opens the Backup Details page where you can also restore or remove the corresponding virtual environment backup.
8.4.1. Creating Backups¶
On the New Backup screen that can be accessed by clicking the Maintenance > Back Up link on the VA toolbar, you are supposed to define all the parameters of the backup operation:
In the Backup Description section, enter any commentary you think can be practical for further backup operations.
In the Backup Options section, set the Backup Type, Backup Node, Number of full backups to keep (containers only), and Compression Level (Virtuozzo 6 containers only) parameters. For details, see Defining per-Physical Server Backup Settings. You can also leave the default Use Hardware Node Settings value. In this case, every virtual environment will be backed up with the default backup parameters of the physical server.
(Virtuozzo 6 containers only) The Exclude section allows you to exclude specific files and directories from backup. If you do not want to back up a whole directory, type it into the corresponding field; to exclude more directories from backup, enter their paths by means of the plus icon.
(Virtuozzo 6 containers only) The Include section allows you to include only specific files or directories inside the virtual environment in the backup. In the field provided, type the absolute path to the file or directory to back up. To include more files or directories, enter their paths by means of the plus icon.
Note
The backup will contain only those files and directories that you have indicated in the Include section. To back up the whole virtual environment, leave the Include section empty.
You can also delay the backup operation until the time specified in the Backup Start group of options.
To start performing the backup, click Backup, otherwise, click Cancel.
You can view the created backups listed on the Backups subfolder of the target physical server. You can use the Backups list to choose virtual environment backups for being deleted permanently or for being restored.
Note the following:
You can back up both running and stopped virtual machines and containers.
Creating a consistent backup of a running virtual machine requires the Virtuozzo guest tools to be installed in that virtual machine.
You cannot back up virtual machines with attached physical HDDs, mounted ISO or floppy disk images, etc.
If you restore a VM or container from backup and back it up again, a full backup will be created. The following backups will be incremental.
Incremental backups will not be created if you manage backups with more than one solution that uses the Virtuozzo API, e.g.,
prlctl backup
and some other.Container images are compacted at 02:00 every night by pcompact launched by a cron job. This process locks container images and prevents any other processes from opening them for writing. As a result, backup processes on locked images may fail. To avoid this, you can either reschedule backups or the pcompact job.
8.4.2. Viewing Backup Details¶
The Backup Details page provides general information on the virtual environment backup in the following table:
Column |
Description |
---|---|
Creation Date |
The date and time when the backing up was performed. |
Backup Size |
The size of the backup. |
Backup Type |
Denotes if it is a full, incremental, or differential backup. An incremental backup stores not all the files and settings of the virtual environment at the given period of time, but only the changes the virtual environment has undergone since the last backup. A differential backup saves the data changed after the last full backup. Note You can create differential backups only for Virtuozzo 6 containers. |
Virtual Environment |
The name of the backed up virtual environment. |
IP Address(es) |
The IP address of the backed up virtual environment. |
Backup Node |
The hostname of hardware node where the virtual environment was backed up. |
If this backup has any description, you can view it in the Backup Description section.
To manage the backup you can use the following options on the Virtuozzo Automator toolbar:
The Restore button restores the selected virtual environment backup.
(Virtuozzo 6 containers only) The Browse button allows you to browse the contents of an archived container backup and restore only the necessary files and directories.
The Remove button removes the current virtual environment backup. Usually this is done to provide extra space for making new virtual environment backups.
8.4.3. Browsing Backup Contents¶
Note
This feature is only supported for Virtuozzo 6 containers.
Virtuozzo Automator allows you to browse the directory structure of any container backup as if this backup had already been restored and restore only the needed files and folders. The Browse Backup page opens after you follow the Browse button on the Backup Details page.
The content of any directory inside the backup is presented in the table. The first table column indicates if the object is a directory or a file. The table on the whole provides the following information:
Column |
Description |
---|---|
Name |
The name of the directory or file. |
Size |
The size of the file. |
Modified |
The date and time of the last modification of the directory or file. |
Permissions |
The standard Linux permissions for the directory or file. |
Actions |
Allows you to download a file to your local computer provided it is not part of an OS or application template. |
If you are browsing an incremental container backup, the information is shown not only on the files and folders from this backup, but on all the contents of the container, should it be restored from this incremental backup. In other words, the backed up container is always presented in its integrity and not as a collections of sporadic changes from the incremental backup.
To restore separate files and folders from the backup to the actual container, just select them by ticking the corresponding check boxes in the rightmost column and click the Restore button.
8.4.4. Renewing Virtual Environment Backups¶
Note
Only full backups can be renewed.
On the Renew Backup screen, you can renew the selected full backup of a virtual environment by replacing it with a new full backup. The selected full backup and all its dependent incremental backups will be deleted and a new full backup will be created regardless of the selected backup type.
Set the parameters of the new backup (you can omit Backup Type) and click Backup to start the operation. For information on parameters, see Creating Backups.
8.4.5. Restoring Virtual Environments from Backup¶
Click Restore Virtual Environment on the infrastructure, physical server, or virtual environment level. The Restore Confirmation screen will open on which you will be able to choose how and where to restore the backup.
You can select the destination hardware node from the Restore on Hardware Node list and, if available, specify a new virtual environment name in the Restore to a new VE with the name field.
Restoration scenarios differ depending on the versions of the source and destination servers. All scenarios comply with the following rules:
The destination server must be registered with Virtuozzo Automator.
Existing virtual environments can only be restored with new names to other servers.
Virtual environments can only be restored with old names to Virtuozzo 6 servers.
VZFS-based containers must be converted to ploop format and backed up again before they can be restored to Virtuozzo Hybrid Server 7.
The sections below describe available restoration scenarios in detail.
8.4.5.1. Restoring from Backup on Virtuozzo 6 Servers¶
You can restore virtual environments from backups stored on a Virtuozzo 6 physical server:
To the same server, with the old name. The original virtual environment, if it exists, will be replaced by the one restored from backup. All changes made to the virtual environment after backup creation will be lost (e.g., the hostname, IP address, and applications). If the original virtual environment is running, the restored one will be started after restoration as well.
To another Virtuozzo 6 server, with the old name, if the original virtual environment has been removed from the source server. A new virtual environment with the old name will be created on the destination server.
To another Virtuozzo Hybrid Server 7, with the old name, if the original virtual environment has been removed from the source server. A new virtual environment with the old name will be created on the destination server with conversion to Virtuozzo Hybrid Server 7 format.
To another Virtuozzo Hybrid Server 7, with a new name. The original virtual environment, if it exists, will remain, and a new one—with the new name—will be created on the destination server with conversion to Virtuozzo Hybrid Server 7 format.
Note
If the configuration of a restored virtual environment conflicts with that of another one (e.g., IP addresses are the same), you will not be able to have both of them running at the same time.
8.4.5.2. Restoring from Backup on Virtuozzo Hybrid Server 7¶
You can restore virtual environments from backups stored on Virtuozzo Hybrid Server 7:
To the same server, with the old name. The original virtual environment, if it exists, will be replaced by the one restored from backup. All changes made to the virtual environment after backup creation will be lost (e.g., the hostname, IP address, and applications). If the original virtual environment is running, the restored one will be started after restoration as well.
To the same server, with a new name. The original virtual environment, if it exists, will remain, and a new one—with the new name—will be created.
To another Virtuozzo Hybrid Server 7, with the old name, if the original virtual environment has been removed from the source server. A new virtual environment with the old name will be created on the destination server.
To another Virtuozzo Hybrid Server 7, with a new name. The original virtual environment, if it exists, will remain, and a new one—with the new name—will be created on the destination server.
To a Virtuozzo 6 server, with the old name, if the original virtual environment has been removed from the source server. A new virtual environment with the old name will be created on the destination server.
Legacy backups created in previous versions of Virtuozzo Automator can be moved to Virtuozzo Hybrid Server 7 manually using Linux command-line utilities (e.g., scp
) and restored to virtual environments with conversion to Virtuozzo Hybrid Server 7 format. Containers can also be restored from legacy backups with the vzarestore
utility. For details, see vzarestore.
Note
If the configuration of a restored virtual environment conflicts with that of another virtual environment (e.g., IP addresses are the same), you will not be able to have both of them running at the same time.