recover LXC Container Data

seb-

New Member
Jul 25, 2024
1
0
1
Hi all,
it happend to me that the PVE I had running for quite a while di not react on ping anymore also webinterface was gone. Rebooting did not work as it showed some errors could not load stuff. After fiddeling arround a bit also with the repair actions not working I decided to do a reinstall.
After that it came to my mind that the PBS was also hosted on the PVE environment....

So before I had:
-one server running
-PVE istalled on SSD-1
-LXC Containers on SSD-2
-PBS Backups on external USB drive

I could not find a way yet to make the data on the USB drive accessible to recover my LXC containers
on SSD2 I still see logical volumes and also naming of the previous containers for these. Is there a way to recreate the LXC containers and use the existing data logical volumes from SSD2 to get the containers backed up?

Hoping for any good news :)
 
on SSD2 I still see logical volumes and also naming of the previous containers for these. Is there a way to recreate the LXC containers and use the existing data logical volumes from SSD2 to get the containers backed up?
Do you also have your previous /etc directory available? I assume not, because your containers were stored on a separate drive. So, unless you know the configuration of each container (stored in /etc/pve/nodes/$HOSTNAME/lxc), you most likely won't be able to recover them (unless I'm mistaken here).

I could not find a way yet to make the data on the USB drive accessible to recover my LXC containers
You can try to set up a new PBS instance and then edit the /etc/proxmox-backup/datastore.cfg file manually, adding the USB drive there. The entry should look something like this:
Code:
datastore: your-datastore-name-here
        path /path/to/your/mounted/usb/datastore

Make 100% sure you use the correct path - the root directory of your datastore should contain a directory named .chunks. So if you have a chunks dir at e.g. /mnt/usb/datastore-name/.chunks, the directory /mnt/usb/datastore-name is the root directory of your datastore. This is the directory you should use as path in your datastore.cfg entry.

If you did everything correctly, the contents of your datastore should show up again and you can restore your containers from your backups.

Note: If your backups are encrypted and you do not have a backup of your encryption key elsewhere, you won't be able to restore them.

I hope this helps!
 

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!