SUSE Blog

I deleted everything.

J. S. Evans

By: J. S. Evans

April 13, 2017 8:43 am

Reads:1,656

Comments:4

Score:4.67

Print/PDF

I goofed.

I’m an avid hobbyist photographer and I happen to live in one of the most beautiful cities in the world. Needless to say, I take a lot of pictures. Recently I upgraded the drive in my home desktop from a slow HDD to 256G SSD. My workflow is like this: I take pictures, I copy the RAW files from my SD Card to my 1.5TB external drive and then copy the ones that aren’t blurry or terrible to my local hard drive for editing and the best ones that are edited get promoted to Flickr. The SSD would make this a lot easier and faster because RAW image files tend to be relatively huge and time consuming to process.

I added the new SSD, installed Tumbleweed, copied my personal files from the old disk to the new one and then deleted the files on the old disk. I had plans to use it for another project. Except one thing; I was in the wrong directory when I deleted everything. All 400GB of pictures were gone. I immediately stopped everything because I knew that deleting files doesn’t actually remove them from the disk. It simply makes them able to be rewritten and I didn’t want to risk that happening.

How I recovered.

OpenSUSE Leap and Tumbleweed have an application called QPhotoRec that saved me.

I loaded the application with the gnomesu command as it needs root access to run:

gnomesu -c qphotorec

From here I was able to choose my disk, the kind of filesystem that I was using and where I wanted the files to be restored to and then I let it run. It’s not a fast process. It took around 8 hours to restore my 400GB and even then there was two thing that I wasn’t able to restore; the filenames and their directories. All of my files had their correct extensions but they were missing the filenames that they originally had and the directories they were in. Also, files inside of other files such as .iso or .tar files were also recovered including thumbnail photos that were stored in other files. QPhotoRec tries to make educated guesses about what is and is not a file and recovered everything but it’s not perfect. My job then was to reorganize my files into some semblance of how they were previously but at least they were there again.

Mistakes happen and hardware breaks. Files get deleted, sometimes important files. The best way to proceed is to always to keep backups (all of my most important files are encrypted and on a remote server) but when disaster happens through human error or otherwise, it’s good to know that there are options.

3 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 5 (3 votes, average: 4.67 out of 5)
You need to be a registered member to rate this post.
Loading...

Tags: , , , , , ,
Categories: Free Tools, openSUSE, Technical Solutions

Disclaimer: As with everything else in the SUSE Blog, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

4 Comments

  1. Hello!

    Yep, photorec it’s a great tool that saved some pics time ago!

    BTW, I took your image for my wallpaper collection, and now it’s in my openSUSE Tumbleweed + Plasma Laptop:

    http://paste.opensuse.org/images/83921421.png

    ‘ve phun!!

  2. By:markgharvey

    What about other file types?

    pdf, html, etc.

    What tool would you recommend to recover these items?

Comment

RSS