Import VMA Backups into Proxmox Backup Server: Difference between revisions
(add placeholder) |
Tlamprecht (talk | contribs) mNo edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
''' | == Introduction == | ||
The <code>vma-to-pbs</code> command allows Proxmox Virtual Machine Archives (VMA) to be imported into [https://pbs.proxmox.com/wiki/index.php/Main_Page 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 <code>vma-to-pbs</code> tool: | |||
<syntaxhighlight lang="bash"> | |||
apt install proxmox-vma-to-pbs | |||
</syntaxhighlight> | |||
In order to be able to import an archive, <code>vma-to-pbs</code> 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: <code><nowiki>[[user@realm[!token]@]server[:port]:]datastore</nowiki></code><br>Refer to the [https://pbs.proxmox.com/docs/backup-client.html#backup-repository-locations '''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: | |||
<syntaxhighlight lang="Bash"> | |||
proxmox-backup-manager cert info | grep Fingerprint | |||
</syntaxhighlight> | |||
== Running The Import == | |||
If you pass the VMA file through <code>stdin</code>, you must also provide a file containing the password for your user via <code>--password-file path/to/pbs_password</code>. | |||
The file may then be imported as follows: | |||
<syntaxhighlight lang="bash"> | |||
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 | |||
</syntaxhighlight> | |||
Alternatively, you may also decompress the archive first and then run the import: | |||
<syntaxhighlight lang="bash"> | |||
zstd -d vzdump.vma.zst | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="Bash"> | |||
PBS_FINGERPRINT='PBS-FINGERPRINT' vma-to-pbs \ | |||
--repository 'user@realm!token@server:port:datastore' \ | |||
--vmid 123 \ | |||
--password-file path/to/pbs_password \ | |||
vzdump.vma | |||
</syntaxhighlight> | |||
'''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
.