Use pbs-restore command

seyed514

New Member
May 22, 2023
5
0
1
Hello everyone
To restore a specific disk from a backup, is it correct to use the pbs-restore command directly?
 
Hello everyone
To restore a specific disk from a backup, is it correct to use the pbs-restore command directly?
Hi,
you can directly restore a disk by running
Code:
proxmox-backup-client restore <snapshot> <archive-name> <target>
snapshot will be the name of the snapshot, archive-name the name of the disk as provided by
Code:
proxmox-backup-client list
and target the destination you want the data to write to.
 
Hi,
you can directly restore a disk by running
Code:
proxmox-backup-client restore <snapshot> <archive-name> <target>
snapshot will be the name of the snapshot, archive-name the name of the disk as provided by
Code:
proxmox-backup-client list
and target the destination you want the data to write to.

thanks
but this command not skip zero in sparse file and not convert raw file to qcow2. how can do this?
 
An option would be to map the disk using proxmox-backup-client map <snapshot> <volume> and use qemu-img convert -f raw <loopdevice> -O qcow2 <filename>.qcow2
 
An option would be to map the disk using proxmox-backup-client map <snapshot> <volume> and use qemu-img convert -f raw <loopdevice> -O qcow2 <filename>.qcow2

Thanks, can I use
Bash:
pbs-restore <snapshot> <volume> <filename>.qcow2 --verbose --format qcow2 --skip-zero
instead of map and convert?
 
pbs-restore can restore to qcow2 :

copy/adjust/paste :

Define PBS repository :
Code:
export PBS_REPOSITORY=root@pam@the.ip.of.PBS:name-of-the-pbs-datastore
export PBS_FINGERPRINT=af:in:ge:rp:ri:nt
export PBS_PASSWORD=mypass

List snapshots available, eg: VM 202 :
proxmox-backup-client snapshot list vm/202

Code:
echo set vmid
vm=202
echo set wanted snapshot
snapshot=vm/202/2025-04-27T02:16:01Z
echo set disk to restore :
drive=drive-scsi0.img
echo Create QCOW2 to restore to , don't forget to set same size as original :
qemu-img create -f qcow2 /mnt/tmp/$drive.qcow2 256G
echo .fidx suffix required to source disk
time pbs-restore $snapshot $drive.fidx /mnt/tmp/$drive.qcow2 --verbose --format qcow2 --skip-zero