[SOLVED] Help with deleted partition

MikaHartgers

New Member
Jan 15, 2024
3
2
3
Hey everyone!

Half an hour ago I had a bit of an incident.
I was messing with the partitions of one of my vms, an ubuntu server vm, and accidentally deleted one of it's partitions that had all my programming work from my personal web server from like the past month on it.
I realise I should have backed it up, and I was working on that also, but it has not been enabled yet so I don't yet have backups..
Is there a way to recover this?
I have hooked it up to my ssd that holds a licensed version of Recovery Explorer and it's scanning as we speak, but I doubt it can find anything and even then I wouldn't know where to look.
Is there another way I can recover the partition? Or at least my webserver's files.

I'm really at a loss right now. Is there anyone with a good idea on how to solve this?
 
Last edited:
I was messing with the partitions of one of my vms, an ubuntu server vm, and accidentally deleted one of it's partitions ...
Is there a way to recover this?
If you know (or can guess) the beginning and the size of the partition, you can try writing a new partition table using gdisk inside the VM (booted with the Ubuntu installer ISO). You'll have to add the removed partition manually: for example the first free sector as start and the end of the drive as end. The are probably guides about this on the internet as this is not specific to Proxmox or virtualization; you can use the same steps as for a real Ubuntu machine.
 
Thanks for the reply @leesteken!
About 10 minutes ago I tried something which worked.
I recovered the lost partition with testdisk on the proxmox host. This recovered the partition but unfortunately I coudn't boot the vm anymore.
I assigned the vm's disk to another vm of mine, and mounted the drive. Luckily I was then able to copy everything I needed over to the disk of the working vm.
I'm now reinstalling the os of the broken vm and after that I can move everything over to it and make it functional again.
Don't worry, installing my backups has now become priority #1! Won't let this happen again ;)