Options for recovering deleted files
I deleted a file last week (a PDF in this case). While I'm able to reconstruct the information I need in this case, I'd like to take precautions against this happening again.
Is there anything built into the OS that will let me recover files? Will enabling time machine allow me to do this? (I don't want it to be taking up lots of room on disc.) Am I best off purchasing a program such as DiskWarrior, or are there free options to do this?
How can I set up 10.6 so that it'll be easier for me to recover deleted files?
Edit: "Deleted" means I emptied the trash.
Solution 1:
If your data is in any way important, you should consider taking proper backups on a reasonable schedule. If you are not familiar with the tools available, then the key is to use something simple that you can understand. For most people, this is indeed Time Machine. It will backup your whole computer, including your personal documents. Recovery is simple, particularly if you know where the file was located before you deleted it, but is simple enough to search for also so long as you can remember roughly what it was called.
The requirements to use Time Machine are
1) A spare hard disk partition, you can partition your own internal drive into 2 but this will obviously reduce your working space and will not protect you from a full disk failure. The better option is to get yourself an external USB disk drive. The drive needs to be at least equal to the size of the disk you want to backup, but for preference should be 2x bigger to allow for revisions and history etc
2) Mac OS X 10.5 (Leopard) onwards.
To set up TM, just plug your disk in, and the system will simply ask if you want to use it for backups. Once you say yes, it will backup changes hourly so long as it is connected. If you disconnect for any reason (you have a laptop and travel with it leaving your backup at home) the changes will just stack up and then be pushed onto your backup disk when it is next plugged in. If you forget to plug it in for any length of time, it will eventually start to remind you that it has been X days since the last backup.
Once you have a backup completed, you can recover files individually, or whole folders, or the entire system onto a fresh disk/computer.
EDIT: I see Disk Warrior recommended a lot, but to me it seems like it's a tool for people who are desperate having already lost data. It will potentially help you recover a "lost" file (but this is never guaranteed). It's a bit like shutting the stable door after the horse has bolted. If you had a backup, you would not need to use this sort of software, but that requires you to be pro-active. Also, it costs $99, and you could buy a backup drive of 1Tb or more with that kind of cash, and be better protected in the future. You just had a near miss, so luckily you appear to have got away with it this time, but better to be proactive and backup, then reactive and try to "undelete" etc.
Solution 2:
Will enabling time machine allow me to do this?
Yes. In Finder, browse to the folder containing the file, then go to Time Machine, browse to the backup from a week ago, and you'll see the file and a button to recover it.
Solution 3:
Time Machine is a good option, but it requires you to be using your home computer and connected to your backup drive.
I recommend Dropbox as a slightly more-robust solution. You get a free account with 2GB of cloud-based storage, and an app for your computer (any platform). When you put something in your Dropbox folder, it is automatically uploaded to the cloud.
Dropbox gives you tools to easily restore deleted files, as well as browse and restore previous versions of existing files. It's always on and works instantly from any computer (no backup disk required).
Solution 4:
To recover a deleted file, use TestDisk. It is a command line tool, but it works great. I was able to recover what I needed using testdisk. I may have used PhotoRec (same developer, included in the testdisk download), but I don't remember.
One thing I would not recommend is TechTool. It has caused our computer to crash.
Solution 5:
Deleting a file and emptying the trash in OS X will delete a file much more permanently than in a Windows environment, thanks to a *nix daemon that clears deleted files with prejudice.
Time Machine is an excellent option to recover files you've accidentally deleted, but this requires a spare volume you'd be willing to dedicate to this purpose and regularly connect to your computer. Depending on how you set your preferences, it will back up your files every X number of minutes, pushing delta updates via rsync
, which will effectively give you "snapshots" of your system at any point in time using a super-slick Apple interface. Definitely try it out if you think you could use it.