[SOLVED] Destroyed my Proxmox installation by deleting folder, how to recover ?

Herkz

Member
Mar 21, 2020
13
2
8
25
Hi,

Long story short, I was in my /var/vz/lib/cache/template folder to check the content of a LXC template that I have unzipped in this folder. When I was over, I deleted the folder one by one using "rm-r /usr" etc etc, in this folder.

This command seems to have deleted ALL the directories such as /var /dev/etc /usr as I had to delete them in the /template folder.

I feel extremely dumb. Now, Proxmox's interface doesn't show up, I can't even log on the CLI, just looping on "login", ssh is dead too.

My set up was :
2 SSD in Mirror ZFS for templates / small container data
1 4TB hard drive for 1 container data (Nextcloud)

If I missed any information, tell me.

How can I recover this mess without loosing all my data ?

Thank you for helping a real moron.

edit : Of course, I have the backup of all the container / data stored on the server but no backup of proxmox itself as I wanted to install a second node to use replication

edit2 : I have a spare SSD at home, maybe I can try to install proxmox recover what I can ?
 
Last edited:
if it's only the PVE config and files that you don't have backed up, you only need to re-create your network and storage config after re-installing - the container config is stored within the backup archives.

to make sure, you can boot a livecd and also take a full backup of the things that are still on the disk (especially /var/lib/pve-cluster would be interesting, as it contains the database that backs /etc/pve!). but recovering from deleting basically the whole system will be hard without a proper re-install.
 
  • Like
Reactions: Herkz
if it's only the PVE config and files that you don't have backed up, you only need to re-create your network and storage config after re-installing - the container config is stored within the backup archives.

to make sure, you can boot a livecd and also take a full backup of the things that are still on the disk (especially /var/lib/pve-cluster would be interesting, as it contains the database that backs /etc/pve!). but recovering from deleting basically the whole system will be hard without a proper re-install.
But is it possible to re-install proxmox without deleting all the data on the existing disk ?
To backup the data, can I just open the disk in my computer then extract the data ?
 
Last edited:
no - reinstalling proxmox will always format the disk (or disks) you select in the installer. you need to save anything you want to keep to another disk before re-installing, e.g. by booting with a live-cd and copying anything you want to keep to another disk.
 
  • Like
Reactions: Herkz
no - reinstalling proxmox will always format the disk (or disks) you select in the installer. you need to save anything you want to keep to another disk before re-installing, e.g. by booting with a live-cd and copying anything you want to keep to another disk.
That's what I did, was able to recover all the data but none of the config file.

Thank you very much !
 

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!