Accidental Deletion of files on Virtual Machine

Using TestDisk to undelete files
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
technoob9
Posts: 1
Joined: 01 Dec 2023, 07:43

Accidental Deletion of files on Virtual Machine

#1 Post 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.

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Accidental Deletion of files on Virtual Machine

#2 Post 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.

Post Reply