HOWTO : Undelete files and directories on Ubuntu

extundelete is a utility that can recover deleted files from an ext3 or ext4 partition.



Hereby, I am going to show to how to compile and install this utility from source on Ubuntu 10.10. The current version of extundelete is 0.2.0 at this time of writing.



Step 1 :



sudo apt-get update

sudo apt-get upgrade

sudo apt-get install build-essential libtool e2fslibs-dev autoconf automake autotools-dev m4 e2fslibs e2fsprogs




wget http://sourceforge.net/projects/extundelete/files/extundelete/0.2.0/extundelete-0.2.0.tar.bz2/download



tar -xvjf extundelete-0.2.0.tar.bz2

cd extundelete-0.2.0

./autogen.sh

./configure

make

sudo make install




Step 1a : (Alternative)



If you want to generate a debian installable file instead of install from source, you can use this step.



sudo apt-get update

sudo apt-get upgrade

sudo apt-get install build-essential libtool e2fslibs-dev autoconf automake autotools-dev m4 e2fslibs e2fsprogs checkinstall




wget http://sourceforge.net/projects/extundelete/files/extundelete/0.2.0/extundelete-0.2.0.tar.bz2/download



tar -xvjf extundelete-0.2.0.tar.bz2

cd extundelete-0.2.0

./autogen.sh

./configure

make

sudo checkinstall




Follow the instruction on screen to complete the debian executable file generation.



sudo dpkg -i extundelete_0.2.0-1_amd64.deb

or

sudo dpkg -i extundelete_0.2.0-1_i386.deb



Step 2 :



Usage :



Help -

extundelete --help



To undelete test.png file at /dev/sda3 and /home/samiux -

extundelete /dev/sda3 --restore-file /home/samiux/test.png



To undelete test directory at /dev/sda3 and /home/samiux -

extundelete /dev/sda3 --restore-directory /home/samiux/test



To undelete all files and directories at /dev/sda3 -

extundelete /dev/sda3 --restore-all



That's all! See you.