T
T
Talyan2021-05-03 22:47:22
linux
Talyan, 2021-05-03 22:47:22

How else can I recover a freshly deleted .tar.gz archive from Ext4?

I accidentally deleted the archiver I needed with ready-made configured virtual machines with FreeSwitch, asterisk, plus all sorts of self-written web muzzles for them.

So it's not a pity - I can set up the server again, but it's a pity for self-written webmords ((, and yet - for the future, the issue of restoring in Linux is important for me.

So, the command was executed on a non-encrypted regular Ext4 partition:
rm -rf ./arch.tar.gz

Archive size is about 6 gigs. After deletion, nothing was written to the folder.The only thing that could write data from above is the browser cache, through which I am currently sitting.I

tried:
testdisk when entering the folder: No file found, filesystem may be

damaged.photorec: does not find .tar.gz files at all, although they are there. Even if you explicitly specify the file extension with the -t switch.

extundelete : gives an error about memory alloc error, googling which leads to a bunch of pages with bug descriptions, some craftsmen even tried to edit, and there are latest bug reports from both 2014 and 2021, and all are the same. Apparently they won't fix it.

R-Studio for Windows: Finds, but the recovered file is not an archive. Apparently, the original archive was fragmented, and when deleting Ext4, information about the fragments was erased.

Of course, I do backups, but damn, why is everything so bad. In Windows, it has never happened that when you delete a file and try to restore it immediately, without overwriting it, the file was not restored. And here is a present for you.

Who will tell you what?
Or fuck off?

I forgot to add: There is only one partition on the disk - the root. I did not mount the /home folder separately.

The second winch if that is available.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-05-03
@flapflapjack

The only thing that could write data from above is the browser cache, through which I am currently sitting.
like you understand everything, but you do this
Any recording to a disk on which an important file has been deleted reduces the chances of successful recovery by a factor!
First of all, you transfer the file system to ro, make a sector-by-sector copy of the partition to the neighboring disk, and only after that you start tinkering.
ps try again https://sourceforge.net/projects/ext4magic/
Unfortunately, as far as I remember, ext3/ext4 is not a very suitable file system for recovering deleted files, very little chance.
In your case, it is possible to restore data by fragments only by content, figuratively speaking, we add another extent to the file if gzip does not give errors, and if it does, then it is incorrect, we take the next free one (you can first go through the contents and remove everyone from whom the distribution of bytes not uniform, like an archive) for a long time, stupidly but will be able to collect if it is possible in principle. Unfortunately, if at least one sector is lost, it will be possible to say goodbye to the data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question