You are not logged in.

#1 2014-11-13 09:47:18

NomadZ
Member
Registered: 2010-04-17
Posts: 6

Data recovery after installation

Hi guys!

I'm not sure if this sub-forum is the best place to ask this, but since I'm not that versed in the matter (and feel like complete newbie for doing a mistake like this), I'll give it a try. Feel free to move this to the appropriate place.

So the problem is that I lost all my data in /home when I was re-installing arch. I assigned the used partitions (/ and /home) with EXT4, like I've always done and went forward with the install, not realizing that /home partition will be emptied... The situation now is, that I have fresh file system sitting on top of my old data, luckily my root partition is separate.

Since then I've done some research about the topic and seen that all might not be lost. There are programs like Testdisk and Photorec that can unearth the lost data, but if I'm correct these can't recover file names or directory structures.

My questions are:

1) is there some way to recover data with directory structure (somewhat) intact?

2) If not, is there some way to recover data with file names and metadata intact?

3) If all else fails and I'm stuck with files with random names, do you have any advice how to sort them out? My main concerns are photos and pictures (had a lot of these), audio & video and some document formats like PDF and .doc.

Thanks for the help!

Offline

#2 2014-11-13 15:09:09

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 458

Re: Data recovery after installation

i think you should try testdisk to recover your partitions.

http://www.cgsecurity.org/wiki/TestDisk

ezik

Offline

#3 2014-11-13 18:40:58

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Data recovery after installation

I'll second that nomination.  Testdisk is, in my opinion, by far the best tool to use if you've flattened an entire partition and want that partition back.  Testdisk will resurrect the partition with all of the data on it intact (with some minor exceptions perhaps but those can usually be fixed with simple config editing and whatnot).

Offline

#4 2014-11-13 18:56:55

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Data recovery after installation

NomadZ wrote:

I assigned the used partitions (/ and /home) with EXT4, like I've always done and went forward with the install, not realizing that /home partition will be emptied...

The "/home" partition is not "emptied" during an Arch Linux installation. Instead, you have to "empty" it yourself by using the "mkfs" command. How did you install Arch Linux? Were you using the Beginner's Guide? Does something need to be corrected in it?

NomadZ wrote:

Since then I've done some research about the topic and seen that all might not be lost. There are programs like Testdisk and Photorec that can unearth the lost data, but if I'm correct these can't recover file names or directory structures.

I used Photorec recently. As far as I know it does not restore filenames or directory structures, BUT... If it's my only option in recovering someone's wedding photos then I'll take whatever I can get. smile

Offline

#5 2014-11-13 20:50:07

NomadZ
Member
Registered: 2010-04-17
Posts: 6

Re: Data recovery after installation

drcouzelis wrote:

The "/home" partition is not "emptied" during an Arch Linux installation. Instead, you have to "empty" it yourself by using the "mkfs" command. How did you install Arch Linux? Were you using the Beginner's Guide? Does something need to be corrected in it?

Actually I used Evo/Lution -installer this time, it does the partitioning via Gparted and "filesystem assignment" (don't know the proper term) via ncurses based interface. The gist is that I somehow misunderstood, that the installer was asking what the already used filesystem of the partition was, not what I wanted it to be. Therefore I answered EXT4 instead of "do nothing" before mount assignments and after that the installer "Quick formatted" the drive. My bad, and boy do I feel stupid...

tl;dr I used installer, nothing wrong with the wiki.

Offline

#6 2014-11-13 21:21:21

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Data recovery after installation

I see. Thank you for the explanation.

I supposed this would also be a good time to consider how you want to do full data backups.

Offline

Board footer

Powered by FluxBB