.. _Managing Virtual Machine Backups:

Managing Virtual Machine Backups
--------------------------------

This section describes the utilities you can use for creating and managing virtual machine backups.

.. _VM prlctl backup, backup-list, backup-delete, restore:

prlctl backup, backup-list, backup-delete, restore
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Creates, lists, deletes or restores virtual machine backups.

::

    prlctl backup <VM_name|VM_UUID> [-f, --full] [-i, --incremental] 
                  [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]]
                  [--description <desc>] [--no-compression] [--no-tunnel]
    prlctl backup-list [<VM_name|VM_UUID>] [-f, --full] [--localvms] [--vmtype vm]
                       [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]]
    prlctl backup-delete {<VM_name|VM_UUID> | -t, --tag <backup_ID>} [--keep-chain]
    prlctl restore {<VM_UUID> | -t, --tag <backup_ID>} [-n, --name <new_name>]
                   [--dst=<path>] [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]]
                   [--no-tunnel]

+------------------------------------------------------------------------+------------------------------------------------------------------------+
| Name                                                                   | Description                                                            |
+========================================================================+========================================================================+
| ``<VM_name|VM_UUID>``                                                  | Virtual machine name or UUID.                                          |
|                                                                        |                                                                        |
|                                                                        | -  Use with ``prlctl backup`` to create a backup of the specified      |
|                                                                        |    virtual machine.                                                    |
|                                                                        |                                                                        |
|                                                                        | -  Use with ``prlctl backup-list`` to list backups of the specified    |
|                                                                        |    virtual machine.                                                    |
|                                                                        |                                                                        |
|                                                                        | -  Use with ``prlctl backup-delete`` to delete all backups of the      |
|                                                                        |    specified virtual machine.                                          |
|                                                                        |                                                                        |
|                                                                        | -  Use <VM_UUID> with ``prlctl restore`` to restore the most recent    |
|                                                                        |    backup of the specified virtual machine.                            |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``-s, --storage [<user>[:<passwd>]@]<server>[:<port>]``                | Specifies a remote backup server address, port, and credentials. If    |
|                                                                        | this option is omitted, the backup will be saved on the default backup |
|                                                                        | server that can be configured using the ``prlsrvctl set`` command.     |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``--description <desc>``                                               | Backup description. Descriptions with white spaces must be enclosed in |
|                                                                        | quotation marks.                                                       |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``-f, --full``                                                         | -  Use with ``prlctl backup`` to create a full backup of the virtual   |
|                                                                        |    machine. A full backup contains all virtual machine data.           |
|                                                                        |                                                                        |
|                                                                        | -  Use with ``prlctl backup-list`` to display full backup information. |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``-i, --incremental``                                                  | Create an incremental backup of the virtual machine. An incremental    |
|                                                                        | backup contains only the files changed since the previous full or      |
|                                                                        | incremental backup. This is the default backup type.                   |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``--localvms``                                                         | List local backups only.                                               |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``--vmtype vm``                                                        | List virtual machine backups on the server.                            |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``-t, --tag <backup_ID>``                                              | The ID of the backup to restore or delete.                             |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``-n, --name <new_name>``                                              | A new name to assign to the restored virtual machine. If omitted, the  |
|                                                                        | virtual machine will be restored with the original name.               |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``--dst=<path>``                                                       | Restore the virtual machine to the specified directory on the hardware |
|                                                                        | node. If this option is omitted, the virtual machine will be restored  |
|                                                                        | to ``/vz/vmprivate/<VM_UUID>``.                                        |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``--no-compression``                                                   | Do not compress the created backup image.                              |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``--no-tunnel``                                                        | Disables connection tunneling for backup. Connection tunneling         |
|                                                                        | provides secure data transmission.                                     |
|                                                                        |                                                                        |
|                                                                        | To use this option, configure the firewall of the destination server   |
|                                                                        | to allow incoming connections on any port on the corresponding network |
|                                                                        | interface.                                                             |
+------------------------------------------------------------------------+------------------------------------------------------------------------+
| ``--keep-chain``                                                       | Preserve the rest of the backup chain when deleting specific backups.  |
+------------------------------------------------------------------------+------------------------------------------------------------------------+

