Previous page

Next page

Locate page in Contents

Print this page

pbackup

The pbackup utility is run on the so-called backup server. It connects via SSH to the servers where some or all Containers are to be backed up and puts the tarballs into the directory defined in the /etc/vzbackup.conf global backup configuration file (the default directory is /var/parallels/backups). Later on, the Container backups may be restored from this directory.

Syntax

pbackup [backup_options] server1 ... [CT_options]

You may specify any number of servers in the command-line by names or IP addresses. You may also enter these names as the value of the BACKUP_NODES parameter in the global backup configuration file to avoid the necessity to specify them in the command-line. In this case, you shall specify the –a option instead.

Notes:

1. This section describes backup options for Containers. For backup options that can be used with virtual machines, see pbackup.

2. While the following two subsections provide the complete reference on the pbackup and prestore utilities, many of their options can be specified in the /etc/vzbackup.conf configuration file to be used as the default ones.

Backup Options

Name

Description

-F, -I

Create a full backup. A full backup contains all virtual machine data.

-i

Make an incremental backup or, if no full backups are available, a full backup. An incremental backup contains only the file that were changed since the previous full or incremental backup.

--ssh-opts <options>

Options to be passed to ssh. See examples in the global backup configuration file.

These options define the list of Containers to back up:

Name

Description

-e <CT_ID|CT_name> [...]

The Containers to back up on the server. Containers can be specified using both their IDs (e.g., 101 or 102) and their names (e.g., comp1 or comp2).

If the --vzcache option is specified, not the Containers themselves, but their caches will be backed up.

-x <CT_ID|CT_name> [...]

The Containers that need not be backed up (Containers to exclude). Containers can be specified using both their IDs (e.g., 101 or 102) and their names (e.g., comp1 or comp2).

If the --vzcache option is specified, not the Containers themselves, but their caches will be excluded from backing up.

It is sufficient to specify only one Container option: either –e, or –x; or to do without any Container options if all the Containers from the specified server(s) are to be backed up.

Container-specific Backup Options

These options must be used with the vzctl command instead of prlctl.

Name

Description

-Cg

-Cb

-Cn

Compress the resulting Container backups with gzip (-Cg), bzip2 (-Cb) or do not use compression (-Cn). This option overrides the BACKUP_COMPRESS parameter in the backup configuration file.

-a

Back up all servers specified in the global backup configuration file.

-c <config>

Use an alternative backup configuration file.

-s

The Containers are to be stopped before their backing up. In this case, if a client tries to access the Containers during their downtime, a temporary "busy" page is shown. This option takes precedence of the BACKUP_VESTOP parameter in the backup configuration file.

-n

The Containers are NOT to be stopped before their backing up. This option takes precedence of the BACKUP_VESTOP parameter in the backup configuration file.

-p

Apply time and load restriction rules for periodic backups. These rules are defined by the BACKUP_KEEP_MAX and BACKUP_LOADAVG_MAX parameters in the backup configuration file (/etc/vzbackup.conf). Without this option, these parameters do not take effect. This option is useful if you invoke pbackup in unattended mode as a cron job. It overrides the CRON_BACKUP parameter in the global backup configuration file.

--desc <desc>

The description of the backup archive.

Descriptions with white spaces must be enclosed in quotation marks.

-j

Is opposite to the -p switch. Turns off the periodic backup mode and disregards the BACKUP_KEEP_MAX and BACKUP_LOADAVG_MAX parameters in the backup configuration file (/etc/vzbackup.conf). It overrides the CRON_BACKUP parameter in the global backup configuration file.

-L

Make use of the BACKUP_FINISH_TIME and BACKUP_LIMIT_TIME in the backup configuration file (/etc/vzbackup.conf).

--rm-tag <tag>

Create a backup and then remove the backup with the specified tag. You can learn the tags of the existing backups on the server by using, for example, the prestore -l command.

--rm-old

Create a backup and then remove the oldest backup of the specified server/Container(s).

--vzcache

Back up not the Containers themselves, but the cache area of the server (/vz/template/vzcaches).