Transfer a VM using PBS

AdminBmq

New Member
Aug 22, 2022
4
0
1
Hello,

here is the situation :
- a proxmox (A) hosted in a ISP with a local repository
- a cluster of proxmox (B) hosted locally with a NAS as repository
- a PBS hosted locally (with another distantly for secondary backups)

The NAS crashed, I need some VMs to be transfered from (B) to (A). I've no longer the disks but I've got the backups as snapshots on the PBS.

Simply copying the snapshots on the adequate directory in the PBS and changing the owner file is not enough : a "Restore" tells me the proxmox is lacking a few files in .chunks/... directories

I want to transform in the PBS these snapshots in complete backups or in disks.
I tried a command with proxmox backup client :
proxmox-backup-client map /bmqstorage/B/vm/114/2023-08-11T01:41:55Z/ drive-scsi0.img --repository AA.AA.AA.AA:local
and I got an error "unable to parse backup snapshot path '/bmqstorage/B/vm/114/2023-08-11T01:41:55Z/'

Well, I guess I am not far from the truth but how can I transform these snapshot backups into something the proxmox (A) will be able to restore ?

Thanks in advance.
 
Last edited:
Hi,
The NAS crashed, I need some VMs to be transfered from (B) to (A). I've no longer the disks but I've got the backups as snapshots on the PBS.
so if I understand you correctly the NAS was used as storage for the VM disks and is no longer available, correct?

Simply copying the snapshots on the adequate directory in the PBS and changing the owner file is not enough : a "Restore" tells me the proxmox is lacking a few files in .chunks/... directories
What do you mean by this? If you have created backups of your VMs to a PBS storage, then there is no need to copy things and change file ownership. You should be able to simply restore the VM by selecting the Storage, navigate to the Backup tab and Restore. Missing chunks might indicate that you either corrupted your backup by your actions or that the backups were corrupt. Do you have verify jobs in place to check data integrity?

Please provide the full task log for the restore job.

I want to transform in the PBS these snapshots in complete backups or in disks.
Not sure what you mean here, all backups performed using the PBS client are full-backups.

I tried a command with proxmox backup client :
proxmox-backup-client map /bmqstorage/B/vm/114/2023-08-11T01:41:55Z/ drive-scsi0.img --repository AA.AA.AA.AA:local
and I got an error "unable to parse backup snapshot path '/bmqstorage/B/vm/114/2023-08-11T01:41:55Z/'
Your arguments for the command are not correct. The second parameter should be just the snapshot, so in your case probably vm/114/2023-08-11T01:41:55Z.

This command will create a loop device which than can be used to either clone the full disk image or mount a filesystem located on the disk or a partition thereof.
 
As far as I understand, he copied/chowned the index files, not knowing how chunks are working. PBS is then complaining about missing chunks, when trying to restore the index files that got copied to another datastore.
Not sure what you mean here, all backups performed using the PBS client are full-backups.
And now he wants something like a VZDump archive he can copy and restore but based on a PBS backup snapshot.

Well, I guess I am not far from the truth but how can I transform these snapshot backups into something the proxmox (A) will be able to restore ?
With PBS there are no single backups you can move around as files because of the nature of deduplication. You could only copy the whole datastore folder with all backup snapshots of all hosts/LXCs/VMs.
You should add your PBS as a storage on the PVE and then directly restore that backup snapshot from the PBS over the network.
 
Last edited:
  • Like
Reactions: Chris
As far as I understand, he copied/chowned the index files, not knowing how chunks are working. PBS is then complaining about missing chunks, when trying to restore the index files that got copied to another datastore.

And now he wants something like a VZDump archive he can copy and restore but based on a PBS backup snapshot.
Ah okay, that will of course not work. If you only copied the index files as suspected by @Dunuin, you will not be able to restore. You will have to restore the backup from the original datastore where also the chunks are located.

I would recommend to either connect the Proxmox VE node refered to as A to the PBS storage and restore the VM from there (from the initial datastore, where the chunks are located) or, if the first approach is not possible restore the backups to a local storage on the Proxmox VE host refered to as B and than transfer them by creating a VMA backup.
 
As far as I understand, he copied/chowned t
Ah okay, that will of course not work. If you only copied the index files as suspected by @Dunuin, you will not be able to restore. You will have to restore the backup from the original datastore where also the chunks are located.

I would recommend to either connect the Proxmox VE node refered to as A to the PBS storage and restore the VM from there (from the initial datastore, where the chunks are located) or, if the first approach is not possible restore the backups to a local storage on the Proxmox VE host refered to as B and than transfer them by creating a VMA backup.
Essentially right. I know what the chunks are for but hoped the snapshot would be complete (it happens). And so I was looking for a way to get a VZDump as stated or any way to get an independant but usable file.
And I've just been shown the way to attach the PBS as a storage and restore from it. So you confirm this use, thank you so much.

Nevertheless, i think it may or should exist a way inthe PBS to transform the snapshot backup into something I could carry in a disk. But it would be a study for some later time.
Many thanks again.
 
Essentially right. I know what the chunks are for but hoped the snapshot would be complete (it happens). And so I was looking for a way to get a VZDump as stated or any way to get an independant but usable file.
And I've just been shown the way to attach the PBS as a storage and restore from it. So you confirm this use, thank you so much.

Nevertheless, i think it may or should exist a way inthe PBS to transform the snapshot backup into something I could carry in a disk. But it would be a study for some later time.
Many thanks again.
You could open a feature request in the bugtracker for that: bugzilla.proxmox.com
As far as I understand it is planned to add a feature to import VZDump archives into PBS. Maybe they could also do the reverse and offer a wa to export VZDump archives from PBS?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!