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 (by default, this directory is
/vz/backup
). Later on, the Container backups may be restored from this directory. It has the following syntax:
pbackup [
backup_options
]
SERVER1
... [
CT options
]
You may specify any number of servers names or IP addresses in the command-line. 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 only 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.
The backup options are the following:
-F
|
Force a plain full backup. Plain full backups of Containers do not allows creating incremental backups on their basis.
|
-I
|
Force a full backup.
|
-i
|
Make an incremental backup or, if no full backups are available, a full backup.
|
-Cg
|
Compress the resulting Container backups with the
gzip
algorithm. This option takes precedence of the
BACKUP_COMPRESS
parameter in the backup configuration file.
|
-Cb
|
Compress the resulting Container backups with the
bzip2
algorithm. This option takes precedence of the
BACKUP_COMPRESS
parameter in the backup configuration file.
|
-Cn
|
Do not compress the resulting Container backups. This option takes precedence of 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.
|
-z
|
Use the VZFS tracking facility to decrease the Container downtime. With this option, the backing up is performed in two stages. On the first stage, the Container is backed up while still running. On the second stage, it is stopped, and the changes in the Container file system that have been made during the first stage are added to the backup. Valid only if used together with the
-s
option.
|
-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
DESCRIPTION
|
The description of the backup archive.
|
-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).
|
--ssh-opts
OPTIONS
|
Options to be passed to
ssh
. See examples in the backup configuration file.
|
--vzcache
|
Back up not the Containers themselves, but the cache area of the server (
/vz/template/vzcaches
).
|
The Container options define the list of Containers to be backed up:
-e
CT1
...
|
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
CT1
...
|
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.
|