View previous topic :: View next topic |
Author |
Message |
fincoop Tux's lil' helper

Joined: 02 Feb 2004 Posts: 147
|
Posted: Sun Apr 10, 2011 5:00 pm Post subject: Howto: Recover deleted files on ext3/4 |
|
|
Having hastily/accidently deleted many files.. i searched long and hard for an undelete solution. I struggled to find any other howto on the net. I have this to share, but was unable to verify it. Im my case it did restore a file that was about the same size, but the file was corrupted. I hope that it brings your files back, should cost you nothing to try it.
Commands needed: extundelete, debugfs. The former I definitely merged but was masked. The latter may have been existing in my Gentoo install.
Procedure:
Code: | $DEV = storage device where deleted file was
# Remember to stop any processes that are attached to this volume before continuing
mount -o remount,ro <$DEV>
debugfs <$DEV>
In Debugfs:
cd <directory where deleted file/dir was>
ls -d
# Note the inode of the deleted item that comes up in the list
quit
Restore:
cd <directory where you want the file recovered to>
extundelete --restore-inode <inode num above> <$DEV>
#If your file recovered, then:
mount -o remount,rw <$DEV>
# Start up processes that use this volume
# Else, you should leave the volume mounted RO and try to find some other recovery methods
# This method is exhaustive, make sure you have plenty of space on the target
extundelete --restore-all <$DEV>
|
Happy hunting. |
|
Back to top |
|
 |
dberkholz Retired Dev


Joined: 18 Mar 2003 Posts: 1008 Location: Minneapolis, MN, USA
|
Posted: Tue Apr 12, 2011 9:51 pm Post subject: |
|
|
There's a few other options in the tree too, in app-forensics/ — magicrescue and foremost have both come in useful. |
|
Back to top |
|
 |
orange_juice Guru


Joined: 16 Feb 2006 Posts: 588 Location: Athens - Greece
|
Posted: Tue Apr 19, 2011 11:57 pm Post subject: |
|
|
Thanx! It worked charmingly!
Kind regards,
orange_juice |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|