Article ID: 6012, created on Feb 5, 2009, last review on Aug 12, 2014

  • Applies to:
  • Virtuozzo containers for Linux 4.0
  • Virtuozzo containers for Windows 4.0


Parallels Virtuozzo Containers 4.0 for Windows:

The example below describes how to configure the backing up of containers to keep backups no longer than two weeks:

1. Create two Windows scheduled tasks with the vzbackup utility:
     - For full backups on Sunday, use the vzbackup CTID command.
     - For daily incremental backups on Monday-Saturday, use the vzbackup -I CTID command.

2. Wait till two backup chains are created (two weeks in our example).

3. Change the backup task that creates the full backup by adding the optional -o vzbackup CTID -o command.

Using this approach, the next backup task creates a new full backup and deletes the oldest backup chain of the container (the oldest full backup and all dependent incremental backups).

Parallels Virtuozzo Containers 4.0 for Linux:

There are several ways to configure backup rotation on a PVC 4.0 Linux server, depending on the backup scheme used: tar (vzbackup utility) or Acronis (vzabackup utility or VZAgent calls). 

1. The vzbackup utility is used to create "tar" backups. You can configure the backup chain length using the /etc/vzbackup.conf file:

# incremental backup parameter. After such number of incremental backups
# the initial incremental backup is performed.

# incremental backup parameter. After such number of days
# the initial incremental backup is performed.

# number of backups to hold. In use when -p option is specified.
# Only initial incremental and full backups are accounted.

The mentioned options allow you to configure when the next initial incremental or full backup will be created and how many backups will be stored.
2. You can use the vzabackup utility with the --rm-old switch in order to remove the oldest backup and create a new one. Here is an example:

# vzabackup -i --rm-old $(hostname) -e 922
* Operation backup_env with the Env(s) is started
* Backing up environment locally
* Checking parameters
* Dumping quota
* Creating backup e096c419-a261-0943-89b5-66d8cf3cd82a/20090908124043
* Adjusting backup type (incremental)
* Backup storage: receiving backup file
* Preparing for backup operation
* Backing up private area
100% |**************************************************************|
* Backing up private area
* Sending private backup data
* Backup storage: storing private backup data
* Backup storage: filling resultant backup info
* Operation backup_env with the Env(s) is finished successfully.
Backup operation for node '' was finished successfully.

You can schedule the execution of this command for each container.

3. If you like, you may use the XML packet, set_backup_config.xml, that is attached to this article. Usage is as follows:

# /opt/vzagent/bin/ local /root/set_backup_config.xml

Or, for a remote node, you may call it as follows:

# /opt/vzagent/bin/ -l root:"PaSsWoRd" IP.ADD.RE.SS /root/set_backup_config.xml

(where "PaSsWoRd" and "IP.ADD.RE.SS" are placeholders for the actual password and IP address of the remote node)

The following tags control the backup parameters in this file:

Set these parameters to the appropriate values. Their meanings are similar to the backup settings in /etc/vzbackup.conf.


28d0f7cc091e3b9304fa556c03f9a940 d02f9caf3e11b191a38179103495106f 965b49118115a610e93635d21c5694a8 35c16f1fded8e42577cb3df16429c57a e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF