Import VMA Backups into Proxmox Backup Server

From Proxmox Backup Server
Jump to navigation Jump to search

Introduction

The vma-to-pbs command allows Proxmox Virtual Machine Archives (VMA) to be imported into Proxmox Backup Server. The archive is converted and then made available as a regular backup in Proxmox Backup Server.

Prerequisites

First, install the package providing the vma-to-pbs tool:

apt install proxmox-vma-to-pbs

In order to be able to import an archive, vma-to-pbs requires:

  • the fingerprint of the PBS instance
  • the PBS repository location
  • the VM ID the archive belongs to
Note: Ensure that the VM ID really matches! You will otherwise end up with the wrong VM should you ever need to do a restore, possibly risking loss of data!

The datastore repository is specified in the following format: [[user@realm[!token]@]server[:port]:]datastore
Refer to the Backup Client Usage Docs for some examples.

Obtaining The PBS Fingerprint

The fingerprint can be copied directly from the web interface via Dashboard -> Show Fingerprint or be displayed by issuing the following command on the Proxmox Backup Server instance:

proxmox-backup-manager cert info | grep Fingerprint

Running The Import

If you pass the VMA file through stdin, you must also provide a file containing the password for your user via --password-file path/to/pbs_password.

The file may then be imported as follows:

zstd -d --stdout vzdump.vma.zst | \
        PBS_FINGERPRINT='PBS-FINGERPRINT' vma-to-pbs \
        --repository 'user@realm!token@server:port:datastore' \
        --vmid 123 \
        --password-file path/to/pbs_password

Alternatively, you may also decompress the archive first and then run the import:

zstd -d vzdump.vma.zst
PBS_FINGERPRINT='PBS-FINGERPRINT' vma-to-pbs \
        --repository 'user@realm!token@server:port:datastore' \
        --vmid 123 \
        --password-file path/to/pbs_password \
        vzdump.vma

Note: For all available options, run: vma-to-pbs --help.