[TUTORIAL] restoreing PBS backup without PBS but with downloaded *.IMG file

vongehlens

New Member
Sep 5, 2021
18
6
3
49
Switzerland
Hello all,

i you read this you might be as desperate as i was because i´d found a chicken-and-egg problem at a friend who called me to fix his crashed PVE storage...
here we go...

Situation:

- backups are done from PVE to Proxmox-backup-server (PBS)
- needed to restore a VM backup without Proxmox-backup-server able to restore to the PVE (chicken-and-egg-problem (PBS inside a PVE and underlying PVE storage crashed))
- PBS still accessible via WebGUI and the download of backups was possible
1636444089333.png

Issue:
how to get the downloaded drive-scsi0.img file (yes, it downloaded as *.IMG not at *.img.fidx!) as harddisk into a newly created VM?


Approach:
use the proxmox forum and find a lot of information that you need to map the *.IMG file using PVE and Proxmox-backup-client. also use google and find the same information in other forums.

Result:
proxmox-backup-client does require the PBS to be available as repository, so mapping did not work because PBS was the machine we wanted to restore (=chicken-and-egg-problem)

Solution:
imagine, because of frustration, and after reading all the official documentation but without finding a working solution, that your heros at Proxmox eventually might have decided that *.IMG files might be just simple disk images… then decide that you try to import that *.img file into a new VM and try to boot it...



how to do that:
  1. have an PVE at hand
  2. create an empty VM with the hardwarespecs of the VM you like to restore but do just add a 2gb disk,
  3. delete the 2gb disk
  4. copy the *.IMG file of that PBS download onto the PVE
  5. use the usual command to import a disk
    1. qm importdisk <vmid> <source> <storage> [OPTIONS]
    2. here i´d to use:
      1. qm importdisk 120 drive-scsi0.img ds-vmachines01 –format raw
  6. ...wait…
  7. boot the vm and enjoy


lessons learned:

- review and rethink your architecture and what could happen if disaster strikes and what you do need then

- avoid chicken-and-egg situations

- be brave and try out something that is not inside the documentation.



Request to Proxmox Team:
- please update your documentation and mention that *.IMG files can be imported by „qm importdisk <vmid> <source> <storage> --format raw“

and finally: you guys at Proxmox do such a phenomenal great job, honestly, that i all time lift my hat and applaude! - Respect! - all the products are really cool and enterprise ready as your culture and support is. Keep going!



kind regards
Stephan
 
thanks for sharing that. I took the liberty to add the tutorial prefix

- review and rethink your architecture and what could happen if disaster strikes and what you do need then

- avoid chicken-and-egg situations
Yeah, that is one of the big reasons why we recommend installing the PBS bare metal to avoid circular dependencies.

- please update your documentation and mention that *.IMG files can be imported by „qm importdisk <vmid> <source> <storage> --format raw“
We will look into how to make it obvious that those are normal disk images :)
 

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!