Page 1 of 1

Accidental Deletion of files on Virtual Machine

Posted: 01 Dec 2023, 07:56
by technoob9
So, here's my post of shame.

I am using Proxmox with a VM. When I unmounted my HDD, I accidentally deleted the data on there. This HDD was formatted as a directory ext4 format. When passed through, I set up two folders - media (contains videos) and metadata.

When I run testdisk, it can detect the partition. However, I just see things like "images", "lost + found", etc. I don't see these two folders. I ran deep search to see what would come up. I see the name of the old partition with some files that say this:

https://imgur.com/a/vN5g3zG

Unfortunately, "New_Drive" was the name I assigned to the HDD when I mounted it to the VM.

Two questions:
1) Is it possible to restore the original partition and if I do so, will it restore these folders? Would I need to pass it back to the VM in order to see the folders?
2) I have read other posts that given it's ext4, it's not possible to un delete them. In Photo Rec, is the best case just to copy the whole drive to a new drive and hope for the best? Or will it not even copy my media because they don't show up in files under Testdisk?

Thanks.

Re: Accidental Deletion of files on Virtual Machine

Posted: 03 Dec 2023, 22:32
by recuperation
technoob9 wrote: 01 Dec 2023, 07:56 So, here's my post of shame.

I am using Proxmox with a VM. When I unmounted my HDD, I accidentally deleted the data on there.
I don't understand what "the data" is.

This HDD was formatted as a directory ext4 format.
I don't understand this sentence.
When passed through, I set up two folders - media (contains videos) and metadata.
I don't know Proxmox and don't from you are passing through something to another location.
When I run testdisk, it can detect the partition. However, I just see things like "images", "lost + found", etc. I don't see these two folders. I ran deep search to see what would come up. I see the name of the old partition with some files that say this:

https://imgur.com/a/vN5g3zG

Unfortunately, "New_Drive" was the name I assigned to the HDD when I mounted it to the VM.

Two questions:
1) Is it possible to restore the original partition and if I do so, will it restore these folders? Would I need to pass it back to the VM in order to see the folders?
This sounds like you deleted the whole virtual disk.
2) I have read other posts that given it's ext4, it's not possible to un delete them.
It depends.
In Photo Rec, is the best case just to copy the whole drive to a new drive and hope for the best? Or will it not even copy my media because they don't show up in files under Testdisk?
PhotoRec is not copying your drive. It is extracting files from a heap of hay.

Your setup is rare and your description does not explain to me what you did. Furthermore it is neither precise nor specific. Unfortunately I am not able to help you.