Proxmox OS disk failure - Restore old container on new disk

robinjongeneel

New Member
Oct 13, 2021
1
0
1
29
Hi there! I'm running a Proxmox 7.0 server. Unfortunately the disk where I kept my VMs, containers and Proxmox itself on failed. I didn't back up the VMs and LXC. I have only a backup of the Postgres server that was running in the LXC. Though the back up is 3 days old (not that problematic, but I hope to restore all data). I have some other disks on which I can continue, but I'd love to try to get the LXC from my old disk and I do not know if this is possible. I've searched around a lot but didn't find anything.

1650546054551.png

The failed disk is currently in read-only mode. I have added the volume and can see the VM disks.

1650546198609.png

Code:
root@server:~# lvscan
  ACTIVE            '/dev/Storj/vm-104-disk-0' [<16.37 TiB] inherit
  ACTIVE            '/dev/pve/swap' [8.00 GiB] inherit
  ACTIVE            '/dev/pve/root' [96.00 GiB] inherit
  ACTIVE            '/dev/pve/data' [<3.49 TiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/swap' [8.00 GiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/root' [96.00 GiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/data' [<794.79 GiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/vm-106-disk-0' [4.00 MiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/vm-106-disk-1' [128.00 GiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/vm-104-disk-0' [132.00 GiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/vm-101-disk-0' [32.00 GiB] inherit
  inactive          '/dev/pve-OLD-7B4D837C/base-108-disk-0' [64.00 GiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/vm-100-disk-0' [64.00 GiB] inherit
  ACTIVE            '/dev/pve-OLD-7B4D837C/vm-102-disk-0' [64.00 GiB] inherit

I can recreate the VMs without problem. The only thing I'd love to restore is the container. Is there any way I can copy the filesystem or restore the LXC to my new disk and keep the data (assuming that the data is still intact).
 
Last edited:
hi,

The only thing I'd love to restore is the container. Is there any way I can copy the filesystem or restore the LXC to my new disk and keep the data (assuming that the data is still intact).
do you have the configuration file for your container? or can you remember the ID for it?

if your old disk is still readable then you should be able to find your container volume in there, create a new container on the new disk and attach the volume to it (by editing the config file of the new container and moving the disk to the appropriate place in your new storage)
 

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!