[SOLVED] Restore separate disk

showiproute

Well-Known Member
Mar 11, 2020
615
32
48
36
Austria
Hello everyone,

is it possible with the current PVE/PBS to restore just a separate disk?
On my fileserver where every disk is being covered by PBS backup my OS disk fails - data disks are fine.

I would just need to restore the OS disk but would not need to restore the data disks (which would consume a lot of time).

Is this somehow possible?
 
is the file server a VM on PVE? or did you manually back it up?
 
okay. then you need to use proxmox-backup-client manually to restore the single disk into a raw image file, and then import that into the existing VM (replacing the broken volume). if you don't have the required extra space, you could also map the disk from the backup, and then copy the contents with dd (or qemu-img dd) to the broken volume (the exact command depends on the storage you are using).
 
Is this mentioned somewhere at a manual as I haven't found it.

Would be a nice feature if you could include at the GUI as I was also really happy to use the live restore feature.
 
https://bugzilla.proxmox.com/show_bug.cgi?id=2768 ;)

no, the exact process is not spelled out in the manual, but basically the following would work:

1. restore the disk: proxmox-backup-client restore <snapshot> scsi0.img restored.img --repository <...>
2. import disk into VM qm set VMID --scsi0 TARGET_STORAGE:0,import-from=/path/to/restored.img,OTHER_OPTIONS_FROM_EXISTING_SCSI0 (replace as needed!)
3. delete old, broken disk (now referenced as unusedX in VM config) after veryfing it worked

or, using map (less space, direct overwrite)

1. map the disk proxmox-backup-client map ...
2. dd from /dev/loopX to path of existing disk (you can use pvesm path to find out the full path)
3. unmap the disk proxmox-backup-client unmap ..

step 2 might need to use qemu-img dd if the target is a storage that is not directly writable as raw image/block device, like ceph using librbd.

obviously, you can and probably should try it out with a test VM and test backup first ;)
 
  • Like
Reactions: showiproute

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!