There are different types of tools available to recover deleted datas. Some of them are following
------------------------------------------
Magicrescue
Ext3grep
Testdisk
Ddrescue
Photorec
ext3undel
------------------------------------------
Ext3grep
This tool provides a good set of command line features and a good idea regarding the ext3 file system.
Merits
Almost any file format can be recovered.
You can recover your files based on the date of deletion.
Even large files can be retrieved using this tool.
Demerits
The tool works only on an unmounted file system.
Frequent crashes of the machine can happen, as it recovers huge amount of data
Download the source code from: http://ext3grep.googlecode.com/files/ext3grep-0.9.0.tar.gz
(OR)
--------------------------------------------------
mkdir ext3grep
svn checkout http://ext3grep.googlecode.com/svn/trunk/ ext3grep
cd ext3grep
./configure -prefix=/opt/ext3grep # Make sure that it does not get installed in the affected partition
make
make install
--------------------------------------------------
Recover the data using inode number
ll -id /vz/private/ We will get inode of /vz/private/ folder using this command
ext3grep /dev/hda1 --ls --inode 27394053 | tee -a output.txt
ext3grep /dev/hda1 --restore-inode <inode num> It will create a directory RESTORED_FILES
mv RESTORED_FILES/inode.111 /vz/private/110
References
---------------------
http://bobcares.com/blog/?p=421
http://gergap.wordpress.com/2008/07/18/how-ext3grep-can-save-you-hours-of-work/
http://prefetch.net/blog/index.php/2009/03/29/recovering-deleted-files-with-ext3grep/
Photorec
wget -N http://www.cgsecurity.org/testdisk-6.12-WIP.linux26.tar.bz2
tar xjf testdisk-6.12-WIP.linux26.tar.
bz2
cd testdisk-6.12-WIP
sudo ./photorec_static
http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step