Import VMA Backups into Proxmox Backup Server: Difference between revisions

From Proxmox Backup Server
Jump to navigation Jump to search
(mention proxmox-vma-to-pbs package)
mNo edit summary
 
Line 8: Line 8:
First, install the package providing the <code>vma-to-pbs</code> tool:
First, install the package providing the <code>vma-to-pbs</code> tool:


<syntaxhighlight lang="Bash">
<syntaxhighlight lang="bash">
apt install proxmox-vma-to-pbs
apt install proxmox-vma-to-pbs
</syntaxhighlight>
</syntaxhighlight>
Line 33: Line 33:
The file may then be imported as follows:
The file may then be imported as follows:


<syntaxhighlight lang="Bash">
<syntaxhighlight lang="bash">
zstd -d --stdout vzdump.vma.zst | \
zstd -d --stdout vzdump.vma.zst | \
         PBS_FINGERPRINT=<PBS_FINGERPRINT> vma-to-pbs \
         PBS_FINGERPRINT='PBS-FINGERPRINT' vma-to-pbs \
         --repository user@realm\!token@server:port:datastore \
         --repository 'user@realm!token@server:port:datastore' \
         --vmid 123 \
         --vmid 123 \
         --password-file path/to/pbs_password
         --password-file path/to/pbs_password
Line 43: Line 43:
Alternatively, you may also decompress the archive first and then run the import:
Alternatively, you may also decompress the archive first and then run the import:


<syntaxhighlight lang="Bash">
<syntaxhighlight lang="bash">
zstd -d vzdump.vma.zst
zstd -d vzdump.vma.zst
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang="Bash">
<syntaxhighlight lang="Bash">
PBS_FINGERPRINT=<PBS_FINGERPRINT> vma-to-pbs \
PBS_FINGERPRINT='PBS-FINGERPRINT' vma-to-pbs \
         --repository user@realm\!token@server:port:datastore \
         --repository 'user@realm!token@server:port:datastore' \
         --vmid 123 \
         --vmid 123 \
         --password-file path/to/pbs_password \
         --password-file path/to/pbs_password \
Line 55: Line 55:


'''Note''': For all available options, run: <code>vma-to-pbs --help</code>.
'''Note''': For all available options, run: <code>vma-to-pbs --help</code>.
[[Category:HOW-TO]]

Latest revision as of 13:15, 25 April 2024

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.