Previous page

Next page

Locate page in Contents

Print this page

Using prlctl backup and prlctl restore

This section describes how to perform the basic backup-related operations using the prlctl utility.

Creating Virtual Machine and Container Backups

You can use the prlctl backup command to back up virtual machines and Containers. This command is executed on the source server and can store the created virtual machine or Container backup on both the source and backup servers. When creating a backup on the source server, you only need to specify the name of the virtual machine or Container to back up. For example, you can execute the following command to back up the MyVM virtual machine and store its backup archive on the source server:

# prlctl backup MyVM

Backing up the VM MyVM

...

The virtual machine has been successfully backed up with backup ID { 746dba2a-3b10-4ced-9dd6-76a2blcl4a69 }

The command output informs you that the virtual machine backup has been successfully created and assigned ID 746dba2a-3b10-4ced-9dd6-76a2blcl4a69 . You can use this ID when managing the backup archive (e.g., remove the backup).

At the same time, you can run the following command to back up the MyVM virtual machine and store its backup archive on the backup server with the IP address of 129.129.10.10 :

# prlctl backup MyVM -s root:1qaz2wsx@129.129.10.10

root:1qaz2wsx before the destination server IP address denotes the root credentials used to log in to this server. If you do not specify these credentials, you will be asked to do so during the command execution.

By default, all newly created backups are placed in the /var/parallels/backups directory. To set a different default backup directory, use the prlsrvctl set command.

Notes :

1. A backup server can be any server running Parallels Cloud Server and having sufficient space for storing virtual machine and Container backups.

2. You cannot back up virtual machines with attached physical HDDs, mounted ISO or floppy disk images, etc.

3. For more information on the options you can pass to prlctl backup , refer to the Parallels Cloud Server 6.0 Command Line Reference Guide .

Listing Backups

You can use the prlctl backup-list command to view the backups existing on the physical server. For example:

# prlctl backup-list

ID Backup_ID Node Date Type Size

{c1dee22f...} {209d54a0...} test.com 2011-05-30 10:19:32 f 411566405

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

This command lists the backups existing on the source server. If you want to list the backups on the backup server, you need to specify the IP address of this server.

The command output shows that currently only one backup exists on the source server. This backup was assigned the ID of c1dee22f-8667-4870-9e11-278f1398eab0 (the full ID is skipped in the command output). The information on the backup is presented in the following table:

Column

Description

ID

The ID uniquely identifying the virtual machine or 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 physical server storing the backup archive.

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.

Restoring Virtual Machines and Containers from Backups

To restore a backup of a virtual machine or Container, you can use the prlctl restore command. The backup will be restored to the server where the command is run. For example, to restore a backup of the MyVM virtual machine stored on the backup server with the IP address of 10.10.100.1 , you can run this command:

# prlctl restore MyVM -s root:1qaz2wsx@10.10.100.1

If you have two or more backups of the MyVM virtual machine, the latest backup is restored. If you want to restore a particular virtual machine or Container backup, you need to specify the ID of this backup. You can use the prlctl backup-list command to list the existing backups and the IDs assigned to them:

# prlctl backup-list -s root:1qaz2wsx@10.10.100.1

ID Backup_ID Node Date Type Size

{c1dee22f...} {209d54a0...} test.com 2011-05-30 10:19:32 i 11566405

{c1dee22f...} {24a3011c...} test.com 2011-05-21 11:12:35 f 356798701

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

You can now indicate the desired ID after the -t option to tell prlctl backup to restore this particular backup. For example, to restore the backup for the virtual machine with the ID of c1dee22f-8667-4870-9e11-278f1398eab0 that was created on the 21st of May, you can execute this command:

# prlctl restore -t {24a3011c-8667-4870-9e11-278f1398eab0} -s root:1qaz2wsx@10.10.100.1

Note: Virtual machines created on servers running Parallels Cloud Server 6.0 cannot be restored on servers with Parallels Server 4 Bare Metal.

Removing Virtual Machine and Container Backups

At any time, you can remove a backup that you do not need any more using the prlctl backup-delete command. To do this, you need to specify the ID of the backup to remove and the ID of the respective virtual machine or Container. If you do not know these IDs, use the prlctl backup-list and check the ID and Backup ID columns. For example:

# prlctl backup-list

ID Backup_ID Node Date Type Size

{c1dee22f...} {209d54a0...} test.com 2011-05-30 10:19:32 f 411566405

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

# prlctl backup-delete c1dee22f-8667-4870-9e11-278f1398eab0 -t 209d54a0-e3b8-4a03-9ca8-d4cc7a2a27ca

Delete the VM backup

The VM backup has been successfully removed.

You can also specify the virtual machine or Container name instead of its ID:

# prlctl backup-delete MyVM -t 209d54a0-e3b8-4a03-9ca8-d4cc7a2a27ca

If you have several backups of a particular virtual machine or Container and want to delete them all at once, indicate only the virtual machine or Container name or ID:

# prlctl backup-delete MyVM

This command removes all backups of the MyVM virtual machine from the local backup server. To remove backups stored remotely, you also need to specify the IP address of the remote Server:

# prlctl backup-delete MyVM -s root:1qaz2wsx@129.129.10.10