Transfer Backups from PVE to PBS

AraToken

Member
Jul 8, 2021
43
5
13
Hello!

i got a few backups on my local backup storage on my PVE server. Is there a way to move and migrate them to a new PBS?
Do i have to transform the format of my backups? My current ones are all using vma / vma.lzo and as far as i know does the BS use a different format (meaning the .fidx and .blob-files)

Thanks in advance for Answers!
 
  • Like
Reactions: mhagen
This what i was looking for, but indeed there doesn't seem to be any way.
Im flabbergasted why this is not existing yet, i;ve a client who want to migrate to PBS but has like 80Tb that needs to be transfered.
(or phased out, create new backups on PBS leave the old for cleanup)
 
For the benefit of any future searchers, this was added when PBS3.3 was released

https://pbs.proxmox.com/wiki/index.php/Import_VMA_Backups_into_Proxmox_Backup_Server

The wiki page doesn't show it but the current version of vma-to-pbs can in fact import an entire directory without piping individual vma.zst files or whatever, which I wish I had realised before I went to the trouble of writing a wrapper bash script to extract VM IDs and timestamps etc from the filename, but never mind, eh

NB
* You have to pull the historical dumps in before you do any newer backups in that namespace (if you want everything, old and new, to be in the same namespace, anyway).
* You will need to make a file containing your PBS API token secret (or the password for the PBS user account, if you're not using a token) - in my example, this is stored in /root/backup-token-secret.txt
* You will need to make a file containing your backup encryption key (you are using encryption, right?) - if you're not using encryption you should remove --encrypt and --keyfile from the vma-to-pbs call. In my example this is stored in /root/backup-encryption-key.txt
* "repository" is in the format "user@realm!tokenid@IPorHOSTNAME:DataStore
* if you're not using a namespace, remove the --ns argument

Here is an example execution, importing to a PBS as a token 'mytoken' issued under the user 'myuser' on a PBS on 192.168.1.20 to datastore called "NVME" to a namespace "my-namespace" from /mnt/pve/cephfs/dump

Bash:
vma-to-pbs --fingerprint '1a:2b:3c:4d:5e:6f:7a:8b:9c:0d:1e:2f:3a:4b:5c:6d:7e:8f:9a:0b:1c:2d:3e:4f:5a:6b:7c:8d:9e:0f:1a:2b' \
 --repository 'myuser@pbs!mytoken@192.168.1.20:NVME" --ns my-namespace \
 --password-file /root/backup-token-secret.txt --compress --encrypt \
 --keyfile /root/backup-encryption-key.txt /mnt/pve/cephfs/dump

And the output would look something like;

Code:
Key Password:
Found 1 backup archive(s) of 1 different VMID(s):
- VMID 100: 1 backups
Proceed with the bulk import? (Y/n): 
PBS repository: myuser@pbs!mytoken@192.168.1.20:NVME
PBS namespace: my-namespace
PBS fingerprint: 1a:2b:3c:4d:5e:6f:7a:8b:9c:0d:1e:2f:3a:4b:5c:6d:7e:8f:9a:0b:1c:2d:3e:4f:5a:6b:7c:8d:9e:0f:1a:2b
compress: true
encrypt: true
Uploading VMA backup from "/mnt/pve/cephfs/dump/vzdump-qemu-100-2025_04_11-14_21_26.vma.zst"
        backup time: 2025-04-11T15:21:26+01:00
        CFG: size: 600 name: qemu-server.conf
        DEV: dev_id=1 size: 34359738368 devname: drive-scsi0
        Uploading dev_id: 1 (0%)
        Uploading dev_id: 1 (12%)
        Uploading dev_id: 1 (24%)
        Uploading dev_id: 1 (36%)
        Uploading dev_id: 1 (48%)
        Uploading dev_id: 1 (61%)
        Uploading dev_id: 1 (73%)
        Uploading dev_id: 1 (85%)
        Uploading dev_id: 1 (97%)
Backup finished within 0 minutes, 13 seconds and 633 ms
 
  • Like
Reactions: Johannes S