Restore Single Disk from PBS

monkee

New Member
Jul 30, 2023
6
1
3
Hi all,

I have a PBS running nested in PVE. All good so far.
I also have OMV (NAS) running as VM in PVE, and as you can imagine, this is a lot of data. The good thing, the data is stored on multiple (physical) disks. Now one physical disk which I used exclusively for OMV died and I want to restore the virtual disks which were stored on this particular physical disk. How can I achieve this, without restoring the whole OMV NAS VM and therefore all disks?

Some background:
The PBS is storing the backups on a physical disk mounted via USB.
The OMV virtual disks and PBS is storing on ZFS with discard.

I know I can download a single disk via the PBS GUI, but (a) how to reimport?, and (b) can I download/import this directly to PVE without doing the extra step and downloading this to my client first? Is there another option like "restoring a single zfs-disk"?

I am open for input.

Thanks! :)
 
there is no built-in way to directly restore a singel disk from pbs to a pve vm.

you can export a single disk (as you said) and then do something like 'qm importdisk' (or just move the file into a position where pve would recognize it, this depends on you r storage setup though)
 
I am still not sure how to do this the smart way.
Can you please give me some guidance in the right direction?

Some more info regarding my setup:
  • The PBS is a VM inside PVE. The physical disk where I store my backups is connected to the VM via USB. It is a ZFS drive.
  • The disk I want to restore was stored on a zfs pool on a physical disk which broke.
  • I want to restore the virtual disk from the PBS to another zfs pool.
Hope this info helps. I would really appreciate some practical tips.

Thanks a lot.
 
Detach your corrupted vDisk
Then create an new empty vDisk in your VM.
Then restore single drive with pbs-restore from PVE Shell / CLI ( replace 127.0.0.1 by your PBS VM ip ) :
https://forum.proxmox.com/threads/restore-individual-disk-from-pbs.115024/post-588786
Thank you very much. It worked perfectly.

For documentation purposes:

This is the initial command which was suggested.
Code:
export PBS_PASSWORD=xxx
export PBS_FINGERPRINT=paste_from_your_PBS
pbs-restore --repository root@pam@127.0.0.1:pbs-datastore vm/XXX/2023-09-11T17:30:04Z drive-scsi0.img.fidx /dev/pve/vm-XXX-disk-0 --verbose --format raw --skip-zero


Some additional info:
  • 127.0.0.1 -> IP of PBS
  • vm/XXX/2023-09-11T17:30:04Z drive-scsi0.img.fidx -> The backup & drive you want to restore
  • /dev/pve/vm-XXX-disk-0 -> The target vDisk which you had to create before starting this process (I created a new vDisk with the same size as the source vDisk I want to restore). If this new drive is on another zfs pool, then use something like this: /dev/other_zfs_pool/vm-101-disk-2
  • I am not sure if this is necessary, but just to be sure I shut down the VM before starting this.
 
Last edited:
  • Like
Reactions: c.o.h.
Thank you very much. It worked perfectly.

For documentation purposes:

This is the initial command which was suggested.
Code:
export PBS_PASSWORD=xxx
export PBS_FINGERPRINT=paste_from_your_PBS
pbs-restore --repository root@pam@127.0.0.1:pbs-datastore vm/XXX/2023-09-11T17:30:04Z drive-scsi0.img.fidx /dev/pve/vm-XXX-disk-0 --verbose --format raw --skip-zero


Some additional info:
  • 127.0.0.1 -> IP of PBS
  • vm/XXX/2023-09-11T17:30:04Z drive-scsi0.img.fidx -> The backup & drive you want to restore
  • /dev/pve/vm-XXX-disk-0 -> The target vDisk which you had to create before starting this process (I created a new vDisk with the same size as the source vDisk I want to restore). If this new drive is on another zfs pool, then use something like this: /dev/other_zfs_pool/vm-101-disk-2
  • I am not sure if this is necessary, but just to be sure I shut down the VM before starting this.
This should be in official documentation.

I detached the drives that I wanted to keep, restored the whole VM, and reattached the drives back. Then I found this instruction.