Using pbackup and prestore
Along with pctl , you can use the following utilities to create and manage backups of your virtual machines:
pbackup . This utility is used to create backups of individual virtual machines or entire Parallels servers.prestore . This utility is used to manage the existing backups of virtual machines.
Backing Up Virtual Machines
The pbackup utility is run on the Backup Server connecting via SSH to the Parallels server and backing up one or more virtual machines 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 backups can be restored from this directory.
Assuming that you are going to back up the entire Parallels server (i.e. all virtual machines 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 on the test.com and put 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 from the specified server, use the e or x switches (to include or exclude the specified virtual machines, respectively). For example:
# pbackup -n root:7ujn6yhb@192.168.10.199 test.com -e MyVM
In this session, only 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.
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 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
{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 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.
|
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 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 virtual machine to their Source Server.
Notes:
1. The current version of Parallels Server for Mac Bare Metal Edition 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.
|