### RECOVERY ### # # For an ext3 filesystem # Requires: ext3grep # # Get the size of an inode (default is 128 for ext3) INODE_SIZE=`tune2fs -l /dev/sda2 | awk '$0 ~ /^Inode.size/ {print $3}'` # Unmount the device if possible umount /dev/sda2 # Then make an image dd if=/dev/sda2 of=sda2.img # (1) To restore a file by its name (file will be restored in RESTORED_FILES/) ext3grep sda2.img -restore-file myfile.txt # (2) To restore files after a given timestamp TIMESTAMP=`date -d "12/21/2009 00:00:00" +%s` ext3grep sda2.img -restore-all -after=$TIMESTAMP ## Refs http://www.xs4all.nl/~carlo17/howto/undelete_ext3.html