Using pbackup and prestore
Along with
pctl
, you can use the following utilities to create and manage backups of your virtual machines and Containers:
-
pbackup
. This utility is used to create backups of individual virtual machines and Containers or entire Parallels servers.
-
prestore
. This utility is used to manage the existing backups of virtual machines and Containers.
Backing Up Virtual Machines and Containers
The
pbackup
utility is run on the Backup Server connecting via SSH to the Parallels server and backing up one or more virtual machines and Containers on this server. The created backup archive is then placed to the directory on the Backup Server defined in the
/etc/vzbackup.conf
global backup configuration file. By default, this directory is
/vz/backups
. Later on, the virtual machine and Container backups can be restored from this directory.
Assuming that you are going to back up the entire Parallels server (i.e. all virtual machines and Containers on this server) with the
test.com
hostname, you can run the following command on the Backup Server:
# pbackup test.com
During the command execution, you will be asked to provide the
test.com
credentials. After doing so, the command will back up all virtual machines and Containers on the
test.com
and put
-
all backed up Containers to the Backup Server
-
all backed up virtual machines to the Source Server
To save the backed up virtual machines also on the Backup Server, you should additionally specify the
-n
option. This option is used to indicate the IP address or hostname of the Backup Server and its credentials:
# pbackup -n root:7ujn6yhb@192.168.10.199 test.com
If you wish to back up not all, but specific virtual machines and Containers from the specified server, use the
e
or
x
switches (to include or exclude the specified virtual machines and Containers, respectively). For example:
# pbackup -n root:7ujn6yhb@192.168.10.199 test.com -e 101 MyVM
In this session, only Container 101 and the
MyVM
virtual machine residing on the Source Server with the
test.com
hostname will be included in the backup, and their backups will be stored on the Backup Server.
Notes
:
1. A Backup Server can be any server running the Parallels Server Bare Metal software and having sufficient space for storing virtual machine and Container backups.
2. For the full list of configuration parameters and command line options for
pbackup
, refer to the
Parallels Command Line Reference Guide
.
Restoring Backups
To restore any individual virtual machines and Containers or entire Parallels servers, you may want to view first the information about them. This can be done using the
prestore -l
command:
# prestore -l -n test.com test.com
root@test.com's password:
...
Backups for node test.com:
ID Backup_ID Node Date Type Size
101 2009-07-15T220425+0400@test.com test.com 2009-06-30 09:42:19 f 18721280
{cd91b90b-469d-42c6-acf4-fefee09cfa61} {4ef87485-ec3b-4594-896b-c7ccbee859b5} test.com 2009-07-16 17:15:47 f 92617398
The command output shows that currently only two backups exist for the
test.com
server on the Backup Server. If you omit the
-n test.com
option, the command will list:
-
all Container backups for the
test.com
server stored on the Backup Server
-
all virtual machine backups for the
test.com
server stored on the
test.com
server
The information on the backups is presented in the following table:
Column Name
|
Description
|
ID
|
The ID uniquely identifying the virtual machine and Container.
|
Backup ID
|
The ID assigned to the backup archive. You need to specify this ID when performing any backup-related operations.
|
Node
|
The hostname of the Source Server.
|
Date
|
The date and time when the backup archive was created.
|
Type
|
The backup type. Currently, you can create two types of backups:
-
A full backup indicated by
f
.
-
An incremental backup indicated by
i
and containing only the files changed since the previous full or incremental backup. This is the default backup type.
|
Size
|
The size of the backup archive, in bytes.
|
To restore Container 101 and the
{cd91b90b-469d-42c6-acf4-fefee09cfa61}
virtual machine, run this command:
# prestore -n test.com -e 101 {cd91b90b-469d-42c6-acf4-fefee09cfa61}
This command will restore the Container and the virtual machine to their Source Server.
You can also use the
-d
option to restore Container 101 to a Parallels server other than the Source Node. For example, this command
# prestore -d 192.168.10.199 test.com -e 101
restores Container 101 to the Destination Server with IP address
192.168.10.199
. If you want to restore all Containers backups for the
test.com
Parallels server, just skip the
-e
option.
Notes:
1. The current version of Parallels Server Bare Metal supports restoring virtual machines to the Source Server only.
2. The
prestore
utility can also manage (list, restore, etc.) backups created using the
pctl backup
command. However, you are recommended to use the same utility (either
pctl
or
prestore
) during the life cycle of a particular backup.
3. For the full list of command line options for
prestore
, refer to the
Parallels Command Line Reference Guide
.
Configuring Per-Server Backup Parameters
A number of default parameters in the global backup configuration file can be adjusted for a particular physical server to be backed up. To do this:
-
Create a new configuration file named
server
.conf
.
-
Put the file to the backup directory. This directory is defined by the
BACKUP_DIR
parameter in the
/etc/vzbackup.conf
global backup configuration file and is set to
/vz/backups
by default.
The
server
.conf
file should contain those parameters that you want to rewrite for a given Parallels server. For a complete list of those backup parameters that can be configured using per-server and configuration files, refer to the
Parallels Command Line Reference Guide
.
|