LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2010, 06:38 PM   #1
the_new_z
LQ Newbie
 
Registered: Mar 2006
Location: The Netherlands
Distribution: Ubuntu 6.06 LTS Server
Posts: 22

Rep: Reputation: 15
Question How to Recover Deleted (partly overwritten) Files in /home on ext3 fs, ubuntu 6.06


OK, I have read the sad stories and now I am a part of them. I think I understand some of the possible solutions (ext3grep, lsof or dedicated software like photorec), but I wanted to check which, if any, you think would work in my case.

Anyhoo, I ran:
Code:
rsync -vur --delete /share/backup/website/ ./
BUT I was not in the dir I thought I was aaand I deleted the contents of my home dir /home/z/ and overwrote them with the files of a small website (several pages).

I am not sure what I have overwritten because I almost don't use the /home/z/ at all. So, if there was something, it was minor and not worth the effort of going through an extensive recovery drill. What concerns me is whether there are any important system files that I may have lost? I recall that I had compiled several programs and the sources were in /home/z/. Otherwise, the system seems to be working as normal, except I don't get the colors when I run 'ls -alF' as user z. Any clues about this? This doesn't bother me that much and I can live with it, but I am not sure if I won't encounter other glitches related to any missing files in the home dir.

My major question is: Should I attempt a recovery or would I do just fine without the missing files in the home dir?

In case I have to recover anything, what would you suggest:

a) use an old backup (about half a year old)
b) recover with some (which?) program
c) something else

Well, thank you very much for the consideration. I am awaiting your replies. I will provide any necessary clarification about the system that you might require.
 
Old 05-31-2010, 06:50 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Well first you need to understand something about the filesystem. Nothing is deleted, it is what is known as 'unlinked'; even the internals of the filesystem avoid the word 'delete'. Basically, the data is still there, or is unless the disk is still mounted and at a stage where it will need overwriting (Low disk space, the deleted files were on a part of the disk which gets written to often etc.).

Now, from the colours thing; see if the bash configs still exist (.bashrc specifically)- this is generally where the aliases for ls are to allow colours.

Your best bet is to try and work out what files have been lost, and if you're able to, then look into data carving (foremost is a fantastic program for this; simple to use too).

Or sack it off as a bad joke, and call it a learning experience; depends whether you find anything important gone. (Though of course the sooner you try to recover the more you'll get)
 
Old 06-01-2010, 04:11 AM   #3
the_new_z
LQ Newbie
 
Registered: Mar 2006
Location: The Netherlands
Distribution: Ubuntu 6.06 LTS Server
Posts: 22

Original Poster
Rep: Reputation: 15
Clonezilla Restore Didn't Work

OK, thank you for the explanation and the advice.

I realize that the data is still there (except what (if anything) was overwritten by the files I rsync-ed). But since there is no way I can remember what files I had there, here is what I tried.

I tried restoring the Clonezilla image of the hdd that has the ill-fated /home/z/ to a partition on an external hdd. The external disk a 500GB ntfs WD Passport that I use for backups. It had 120GB free, so I used gparted to cut away a 100GB ext3 partition for the restoration since the disk with the /home/z/ dir is 80GB.

In short, it didn't work. I went through the settings and options of Clonezilla for restoring an image to a partition, but in the end, it showed an error and suggested that the image may be corrupt. Although I have had this image for quite a while, I have never used it. So, I don't know whether it is corrupt or I am not using Clonezilla as it is meant to be used.

Any suggestions on how to proceed?
 
Old 08-05-2010, 02:44 PM   #4
the_new_z
LQ Newbie
 
Registered: Mar 2006
Location: The Netherlands
Distribution: Ubuntu 6.06 LTS Server
Posts: 22

Original Poster
Rep: Reputation: 15
Well, it has been some time, but I eventually solved my problem.

Here is what worked for me.

The corrupted clonezilla image was not so corrupted after all and thanks to the advice here and here, I managed to mount the image of the partition that I needed. I copied whatever I had overwritten then used

Code:
source .bashhrc
to get back the colors when using ls. Now, everything is back to normal.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recover deleted files from ext3 filesystem digdogger Linux - Software 15 07-16-2016 09:11 AM
Any application to recover deleted files in Ubuntu 8.10 vibinlakshman Linux - Software 4 12-13-2008 01:43 AM
LXer: HOWTO recover deleted files on an ext3 file system LXer Syndicated Linux News 0 03-14-2008 02:11 PM
Data Recovery Ext3 or ReiserFS (since partly overwritten) Dark Carnival Linux - Software 3 01-07-2008 10:04 AM
is it possible to recover deleted files under Ubuntu vansch76 Linux - Newbie 8 12-11-2007 07:51 PM


All times are GMT -5. The time now is 10:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration