Restore single Virtual Disk from PBS

zeuxprox

Renowned Member
Dec 10, 2014
96
6
73
Hi,

my configuration is:
  • Cluster of 5 PVE nodes (PVE 7.0-10) whit Ceph 16.2.5
  • n. Proxmox Backup Server 1.0-5 (I will update it next month)
I have some backups of a Windows Server 2019 guest wits 2 virtual disks (scsi0 and scsi1) and I want to restore only one virtual disk (scsi0). How can I do it? In the GUI I can restore only the full VM, I can't choose which virtual disk to restore...

Could you help me, please

Thanks
 
Hi,
it should be possible via the GUI in Proxmox Backup Server as a file (download button beside the VM's drive-xxx.img.fidx when you expand the backup) drive or via the CLI, e.g.
Code:
proxmox-backup-client restore vm/127/2021-09-09T07:46:38Z drive-scsi0.img.fidx vm-127-disk-0.raw --repository 192.168.20.180:datastore
Also see man proxmox-backup-client. Note that this will restore the drive to the file vm-127-disk-0.raw, so you still need to add it to the VM and replace it manually.
 
  • Like
Reactions: Johannes S
Hi,
it should be possible via the GUI in Proxmox Backup Server as a file (download button beside the VM's drive-xxx.img.fidx when you expand the backup) drive or via the CLI, e.g.
Code:
proxmox-backup-client restore vm/127/2021-09-09T07:46:38Z drive-scsi0.img.fidx vm-127-disk-0.raw --repository 192.168.20.180:datastore
Also see man proxmox-backup-client. Note that this will restore the drive to the file vm-127-disk-0.raw, so you still need to add it to the VM and replace it manually.
Hi Fabian,

so from the GUI of PVE7 it's possible to restore only the full VM and not a single virtual disk?
 
  • Like
Reactions: uncletall
Hi,

are you planning, in an upcoming release, to allow the restore of a single virtual disk in addition to the entire VM and the single file?

Another really useful feature would be being able to create VLANs in the GUI ...

Thank you
 
Hi,

are you planning, in an upcoming release, to allow the restore of a single virtual disk in addition to the entire VM and the single file?
There also is a recent feature request, but the backup process in Proxmox VE is fundamentally designed on a per-guest level, so supporting this won't be easy and there are no concrete plans I'm aware of.

Another really useful feature would be being able to create VLANs in the GUI ...
Should be possible when you select a node and then System > Network > Create > Linux VLAN?

Thank you
 
Hi,

my configuration is:
  • Cluster of 5 PVE nodes (PVE 7.0-10) whit Ceph 16.2.5
  • n. Proxmox Backup Server 1.0-5 (I will update it next month)
I have some backups of a Windows Server 2019 guest wits 2 virtual disks (scsi0 and scsi1) and I want to restore only one virtual disk (scsi0). How can I do it? In the GUI I can restore only the full VM, I can't choose which virtual disk to restore...

Could you help me, please

Thanks
Where in the GUI is the restore functionality? I have been backing up for awhile but today is first time to restore a VM, for some reason I can't seem to find it.
 
Hello,

As a workaround, you can do this :
- Reassign all the disks you want to keep to another temporary VM (Reassign Owner). No need for it to be powered-on.
- Restore the whole VM from the backup.
- Detach the disks you previously reassigned, remove them
- Reassign the disks from the other VM to this VM

I did this and it worked for me. All the VMs were powered-off.
 
Hello,

As a workaround, you can do this :
- Reassign all the disks you want to keep to another temporary VM (Reassign Owner). No need for it to be powered-on.
- Restore the whole VM from the backup.
- Detach the disks you previously reassigned, remove them
- Reassign the disks from the other VM to this VM

I did this and it worked for me. All the VMs were powered-off.
Brilliant!
 
Can you tell me which way and how I need to add to proxmox-backup-client restore vm/104/2025-01- 05T23:00:03Z drive-scsi0.img.fidx vm-104-disk-1.raw --repository 192.168.88.11:bs1 so that the disk can be restored in VM 104? I use local-lvm LVM-Thin.
 
Hi,
Can you tell me which way and how I need to add to proxmox-backup-client restore vm/104/2025-01- 05T23:00:03Z drive-scsi0.img.fidx vm-104-disk-1.raw --repository 192.168.88.11:bs1 so that the disk can be restored in VM 104? I use local-lvm LVM-Thin.
you can allocate a disk in LVM thin and then, when restoring, redirect the data there:
Code:
pvesm alloc local-lvm 104 vm-104-disk-1 1G
lvchange -ay /dev/pve/vm-104-disk-1
proxmox-backup-client restore vm/104/2025-01- 05T23:00:03Z drive-scsi0.img.fidx --repository 192.168.88.11:bs1 - > /dev/pve/vm-104-disk-1
qm set 104 --scsi0 local-lvm:vm-104-disk-1

Of course you will need to specify the correct size rather than 1G and this assumes that the local-lvm configuration is the default one (with volume group called pve).

EDIT: add missing activate command
 
Last edited:
It turns out that this way I can reduce the size of the disk if, for example, I have a 600 GB disk with 300 data on it? Wow!
 
Last edited:
Oh sorry, there is a step missing. The above only works correctly if the volume is activated with lvchange -ay pve/vm-104-disk-1. Otherwise, the restore command will create a regular file under /dev/pve/vm-104-disk-1 which is not a logical volume instead of writing the data to the logical volume.
 
Last edited: