Restore PBS backup directly from hard drive rather than network

guyjames

New Member
Nov 8, 2022
7
0
1
This is my first post here and I apologise if this has already been covered but I couldn't find anything on the forum which has the information I need.

The situation is that I have PVE v7 with an Xpenology VM of around 4.2TB. My intention was to reorganise the disks in the server, so I got a 4TB hard drive and made a PBS using an old computer (PBS v2.2). I then backed up the VM over the network (took about 2 days to copy it over, but it worked fine, I got the 'OK' message anyway). The compression meant that the data fit on around 2TB of the backup disk.

I then deleted everything off the PVE server and installed the latest version of PVE on bare metal. The next step was to restore the backup, however this took much longer to do than the restore, after about 3 days it had only done 40% or so, then there was a brief glitch in the power supply (to the whole house) and the restore failed.

Not wanting to wait another week or so for the restore, I plugged the PBS hard drive with the backup on it into the PVE server, with the hope that I could either just copy the vzdump files over and restore from them, or do a restore directly from the backup. However, after SSH-ing in and looking around on the backup drive, I couldn't find the vzdump files, or at least I did find them but they were apparently much smaller than they should have been, looking more like pointers to the actual files, which, if I remember correctly were in folders called something like 'chunk-1' 'chunk-2' etc.

I tried to backup over the network again but there was another power glitch (no I don't have a UPS and yes I know I should have but it's not feasible right now) so it failed again.

So my question is, is there any way I can either: resume a restore from one that has failed, rather than starting again. Or: restore from a hard drive taken from a PBS machine and put into a PVE server?

A third option now occurs to me: install PBS as a VM on the PVE server, attach the disk from the physical (bare metal) PBS to that VM, add this PBS to PVE, and then restore the VM backup to PVE from the virtual PBS (presumably much quicker as they are on the same physical machine, although if it has to be over the network via my consumer-grade router maybe it wouldn't be faster).

Any clues or help on any of this are much appreciated. :)
 
A third option now occurs to me: install PBS as a VM on the PVE server, attach the disk from the physical (bare metal) PBS to that VM, add this PBS to PVE, and then restore the VM backup to PVE from the virtual PBS (presumably much quicker as they are on the same physical machine, although if it has to be over the network via my consumer-grade router maybe it wouldn't be faster).
I would suggest to to so; moreover: you can install the complete (i.e. the system disk too) PBS as VM in the PVE host, just adapt network settings (since you have to use virtual NICs instead of real ones) afterwards. Then you use still network, but just the virtual one and your indpendent from any hardware issues and will be much faster too (use virtio NICs).
 
  • Like
Reactions: guyjames
Thanks for the reply.

Do you mean make an image of the whole hardware PBS and convert that into a VM?

Or just install PBS from scratch as a VM on the PVE then attach the 2nd disk with the backup onto it? And if the latter, what would be the best way to attach the disk (obviously without wiping it)?
 
you can restore individual archives (e.g., pxar files or raw images or config file blobs) in a disaster recovery scenario using proxmox-backup-debug (it reads directly from a datastore directory, without requiring a running PBS instance). usually the amount of time it takes to setup PBS on the PVE host itself is neglible, and you get all the benefits of convenient access over the GUI including live-restore and selective file-restore, so it is almost always the recommended way to go
 
you can restore individual archives (e.g., pxar files or raw images or config file blobs) in a disaster recovery scenario using proxmox-backup-debug (it reads directly from a datastore directory, without requiring a running PBS instance). usually the amount of time it takes to setup PBS on the PVE host itself is neglible, and you get all the benefits of convenient access over the GUI including live-restore and selective file-restore, so it is almost always the recommended way to go
Ok thanks, good to know. I agree it will probably be better to set up a PBS on the PVE node instead. I just need to know the best way of attaching a physical disk to the PBS (the one containing the backups) and how to set up the virtual NICs.
 
Can anyone point me in the direction of a noob guide to getting this set up please?
1. remove the disks from PBS and put them into PVE host
2. figure out which names got these disks in PVE host (e.g. /dev/sdx and /dev/sdy where sdx is the bootdisk)
3. create at PVE a new virtual machin with 2 empty disks at scsi0 and scsi1 (size and storage do not count)
4. replace in /etc/pve/quemu-server/<vm-id>.conf the text after "scsi0: " and "scsi1: " by /dev/sdx resp. /dev/sdy
5. make sure that scsi0 is defined as boot device
6. boot the new vm - should be the PBS as it was before at bare metal server
7. adapt network settings both inside the VM (the pbs will use different NIC names now) and at PVE host (possibly using a new bridge for connection to PBS VM only)

You may adapt the above method according to your current environment (i.e. e.g. more disks).
 
Ok thanks a lot! That's very clear. The only thing I might need further help on is the networking but I will give it a try first. :)
 
1. remove the disks from PBS and put them into PVE host
2. figure out which names got these disks in PVE host (e.g. /dev/sdx and /dev/sdy where sdx is the bootdisk)
3. create at PVE a new virtual machin with 2 empty disks at scsi0 and scsi1 (size and storage do not count)
4. replace in /etc/pve/quemu-server/<vm-id>.conf the text after "scsi0: " and "scsi1: " by /dev/sdx resp. /dev/sdy
5. make sure that scsi0 is defined as boot device
6. boot the new vm - should be the PBS as it was before at bare metal server
7. adapt network settings both inside the VM (the pbs will use different NIC names now) and at PVE host (possibly using a new bridge for connection to PBS VM only)

You may adapt the above method according to your current environment (i.e. e.g. more disks).
I have done this and the backup is now being restored from the PBS virtual machine. It was a bit tricky to set up the network bridge but I managed it. Thanks for the help.

One thing that has surprised me is how slowly the backup is being restored; ok I am using spinning hard disks and not SSDs but given that the network is virtual rather than using physical cables and switches, the speed seems to be roughly what it was when the network was physical, i.e. very slow.
 
well, restoring is pretty much random access, and a spinner is not known for doing that fast ;)
 
  • Like
Reactions: guyjames
Well the backup finally restored: TASK OK! But, the resulting Xpenology image is now corrupted, it says 'Volume has crashed'. It was working fine when I backed it up and now I have apparently lost all that data. Nothing too important fortunately, but rather annoying all the same.
 
Unfortunately I have no experience with Xpenology, so I can't tell you what that message indicates exactly and whether it's recoverable somehow. Maybe it requires special consistency measures when taking a backup?
 

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!