A Program I'd Like to See

I’m probably asking for the moon but, if you’ve been following my recent thread Please Help - I have made a horrible mistake, you know that I accidentally deleted (“permanently”) my entire Documents folder in /Home. After trying all night to recover it, I finally was forced to take the computer to a local computer repair shop where they hope that they will be able to recover the folder and the files therein.

What I’d like to see created is a quick Linux program that could immediately “undelete” folders/files if someone else makes a mistake as I did. One of the people responding to me mentioned that he had done the very same thing so it’s possible that it is not an uncommon error.

Is there someone (or many people) who could create a simple program that would fix this problem?

I’ll bet that a lot of people would be grateful and glad to have such a program. I know that I would!

Lawrence

No. :hugs:

2 Likes

I think you are underestimating how difficult of a task this is. Once you have deleted data, there isn’t a “simple” way to recover it. You have to go through and try to figure out where the data was and piece it back together. This is complicated to being with but then you have to deal with the fact that there are multiple kinds of filesystems out there. Even if you stick with the common filesystems you are still talking 5-10 different implementations.

I would recommend that, instead, you consider using an automated backup solution going forward to insulate from such disasters.

6 Likes

In the old days of Windows before NTFS and defragging hard drives was common place, things were a little easier to restore. That’s why with FAT16 or FAT32 there were programs floating around such as wipe. Now with SSDs and TRIM, files are scattered all over the place in little chunks.

Plus there would be a security issue. If you are working on shared files in an office, and you delete files that you don’t want seen, such as preliminary rough drafts, what’s the point if someone else can super easily restore them? Again, why you would want to use wipe to wipe a file or a disk in the bad old days.

Pudge

1 Like

I saw your post and was curious as to what file manager you use that you could delete something without a dialog box to confirm. An easier method than trying to recover deleted files would be to stop the accidental deletion in the first place. I have a very bad habit of never using the trash bin; one that’s sure to come back to bite me.

1 Like

The fix would be to use backups. A lot cheaper than taking it to a repair shop.

5 Likes

Exactly my thoughts. Anything that’s worth paying tons to a data recovery service to get back is worth backing up in the first place so you dont need to. :slight_smile:

2 Likes

Timeshift

If set up to do so, Timeshift can restore deleted files in the home dir or anywhere else for that matter.

2 Likes

Lot of options exist:

  • btrfs snapshots (manually or e. g. Timeshift, snapper)
  • lvm snapshots (manually, snapper?)
  • backup! ( e. g. rsync, timeshift …)

Just treat it as a painful learning experience … :wink:

3 Likes

ZFS with automated snapshots (e.g. using Sanoid).

You can access snapshots via a subdirectory and browse all of the past versions organised by date. It works really well:

This is the same system that network storage appliance vendors use (e.g. NetApps, Compellent, etc.).

4 Likes