Linux Data Recovery Tips
Over the past few years I've learned a bit about Linux Data Recovery. The idea is to share some of that information here. Some of it might be useful to you.
Data Recovery
Yeah I deleted some files. After a very lengthy google session I found extundelete and r-linux that works okay to undelete files on ext3/4 filesystems. While R-Linux is Windows based you can run it in a Virtual Machine and connect the drive via USB (in a casing for external drives) to Windows in the VM. I use Virtual Box from time to time to run Windows. These two programs is about all hope there is to recover files off ext4 partitions. If you know of any other software that's free and can recover deleted files from ext4 partitions let me know.
Sometimes you need to recover a bad drive. Most websites will tell you to use dd to make an image of the drive or to clone it to a new drive. DON'T! While dd is good for everyday copying of images and drives it can land you in serious trouble. I've had damaged drives that was rendered useless by using dd. When dealing with a damaged drive you can't be to careful. Don't use Ddrescue that is available in the repo's either. The best option is to download and compile GNU Ddrescue and use that. It just works better and you can stop and continue the cloning process without having to start over. For example ddrescue /dev/sdb diskimage.img clonelog.log will save the progress to a log file. You can run the command any time and it will carry on where from where it was stopped. Another nice thing about GNU Ddrescue is that you can tell it to copy 10GB starting from 3GB and it will only copy 3GB of the data. This is very useful when working with drives that have bad blocks. This way you can copy all the good data first and then try to recover everything else later. Always use log files with GNU Ddrescue. It will skip bad areas and come back to them when everything else is copied. I've managed to copy a 20GB disk that dd could not copy and I could not read the data with anything else. Only 245KB of data was lost and after copying the disk with GNU Ddrescue I was able to read all the information.
To recover pictures and other files use TestDisk and PhotoRec. TestDisk will also recover partitions and undelete directories and files.
Golden Rules of data Recovery
1.) ALWAYS work on a copy of your data! NEVER use the original disk. If anything goes wrong you're screwed!
2.) Double check your commands and make sure you understand what you are about to do! Especially when you clone disks. If you copy an empty disk over the data that you want to recover there's no hope to get it back.
3.) Never try to recover data when you are tired or stressed out! Yeah I know you need to get it back but you'll just make mistakes and it's not worth the risk when it comes to your data.
4.) MAKE BACKUPS! (yeah right who does that until it's too late?)
If you have any questions contact me and I'll add the info to this page!
Last but not least - Good Luck!
Download Ubuntu amd64 Mxit plugin for Pidgin