[SOLVED] How to recover data from backup drive if OS drive is gone?

Razva

Renowned Member
Dec 3, 2013
252
10
83
Romania
cncted.com
Hello,

Let's take an example. Supposing that I have a backup server that uses 1 SSD for the OS (Proxmox Backup) and 1 HDD where I'm storing the backups.

Next, supposing that the SSD dies basically the backup server will not function any more but the backups will be present/untouched on the HDD.

How will I be able to recover the backups from the (fully functional) HDD? Is there any way to "import" the backups in a new Proxmox Backup installation/server?

Thank you
 
  • Like
Reactions: Florius
I never did that before and maybe I'm mistaken but this should work as follows: You mount the backup hdd in the system under a mount point of your choice, then you setup a data store with that mount point and should be fine.
In order to not destroy anything upon creation of the data store you could test it with read only mount first.
 
  • Like
Reactions: Razva
I never did that before and maybe I'm mistaken but this should work as follows: You mount the backup hdd in the system under a mount point of your choice, then you setup a data store with that mount point and should be fine.
In order to not destroy anything upon creation of the data store you could test it with read only mount first.
Ok, so basically backup data can be managed by any backup server and it's not linked to a specific server/machine/ID. Is this correct?
 
Ok, so basically backup data can be managed by any backup server and it's not linked to a specific server/machine/ID. Is this correct?
yes. a datastore is self-contained as far as the stored backups are concerned. verification/prune/garbage-collection schedules are stored in /etc/proxmox-backup/datastore.cfg, so that would need to be re-created. the same applies to remotes and sync jobs, or tape-related configuration.
 
  • Like
Reactions: Florius
yes. a datastore is self-contained as far as the stored backups are concerned. verification/prune/garbage-collection schedules are stored in /etc/proxmox-backup/datastore.cfg, so that would need to be re-created. the same applies to remotes and sync jobs, or tape-related configuration.
Are there any guides on how to restore the backup, or a specific command?
Would you use `pct restore` for this? It isn't a .tar.gz file of course, but a pxar file.

Thank you in advance!
 
Last edited:
if you have a copy of the datastore, for PVE backups you need to
  1. setup PBS (can be colocated with the PVE instance)
  2. add an entry to /etc/proxmox-backup/datastore.cfg pointing to your existing datastore
  3. add a storage entry for this PBS instance and datastore on the PVE side
  4. use pct restore or qmrestore to restore VM backups
for host backups the procedure is similar:
  1. setup PBS
  2. add entry to datastore config
  3. use proxmox-backup-client to restore
optional steps include recovering encryption keys using key backups or master keys, setting up user/token/ACL for access, ...
 
  • Like
Reactions: Caes
if you have a copy of the datastore, for PVE backups you need to
  1. setup PBS (can be colocated with the PVE instance)
  2. add an entry to /etc/proxmox-backup/datastore.cfg pointing to your existing datastore
  3. add a storage entry for this PBS instance and datastore on the PVE side
  4. use pct restore or qmrestore to restore VM backups
for host backups the procedure is similar:
  1. setup PBS
  2. add entry to datastore config
  3. use proxmox-backup-client to restore
optional steps include recovering encryption keys using key backups or master keys, setting up user/token/ACL for access, ...

Hi,

I wanted to add the datastore to a new PBS server, and said the .chunks directory already existed.
So I removed the .chunks directory.

Now all my backups are corrupt. Since this is just a test, I just make new ones, however, how would one handle that when it's for real?

EDIT: To explain a bit more:
After my test I reverted to my original setup, and made a new backup of a LXC container.
Then I tried to restore it, but it gave a "no such file or directory". I ran a verify on PBS and gave the error "2021-05-28T09:32:35+00:00: can't verify chunk, stat failed - No such file or directory (os error 2)".

Thanks!
 
Last edited:
Hi,

I wanted to add the datastore to a new PBS server, and said the .chunks directory already existed.
So I removed the .chunks directory.

Now all my backups are corrupt. Since this is just a test, I just make new ones, however, how would one handle that when it's for real?

well.. if you remove the .chunks directory all the backup data is gone, and just the metadata remains. so this is kind of to be expected ;) that is why I said "add an entry to ..." and not "create a new datastore using the GUI". we are working on streamlining adding an existing datastore to make this a bit more user friendly.
 

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!