Previous page

Next page

Locate page in Contents

Print this page

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. By default, the created Container backups are placed to the /vz/backups directory and the backups of virtual machines are put to the /vz/vmprivate/backups directory. You can change the default backup directories

  • for Containers, by editing the /etc/vzbackup.conf file
  • for virtual machines, by using the --backup-path option of the prlsrvctl set command

Let us assume that you want to back up the entire Parallels server (that is, all virtual machines and Containers on this server) with the test.com hostname. In this case, 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 , consult the Parallels Server Bare Metal 5.0 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 2011-05-... test.com 2011-05-30 09:42:19 f 18721280

{cd91b90b...} {4ef87485...} test.com 2011-05-16 17:15:47 f 92617398

[ The ID and Backup ID are reduced for better readability. ]

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. Virtual machines created on servers running Parallels Server Bare Metal 5.0 cannot be restored on servers with Parallels Server 4 Bare Metal.

3. The prestore utility can also manage (list, restore, etc.) backups created using the pctl backup command. However, you are highly recommended to use the same utility (either pctl or prestore ) during the life cycle of a particular backup.

4. For the full list of command line options for prestore , refer to the Parallels Server Bare Metal 5.0 Command Line Reference Guide .