So I have been running rsync backups for a bit now, and I have been saved a couple times from deleting something that I really wanted. Unfortunately, some of the stuff that I really want to keep are the things that take up a lot space. This doesn’t work that well since you have to have an extra drive with the same amount of space on it to back it up to. What I realized on the way home today was that I wasn’t really worried about a drive failure. If that happens then I am screwed anyway. What I really needed was a way to recover things if I accidentally deleted them. Unfortunately, that is one of the main things that Linux lacks. If you whack it from the drive it is pretty much gone, but there is an aspect of the rsync backups that will help me out. Hard-Links. You see in Linux, for those of you that don’t know, you can have a single copy of a file on the hard drive, but it appears several places in the filesystem. This saves space on the hard drive and if it is changed one place it is changed everywhere. The best part is that as long as there is one link on the drive the data is still there. Therefore if I do something to delete the directories that contain my movies or mp3s they are still there as long as there is another link. So I built a script that runs every night and and makes a completely hard-linked copy of the directory and rotates yesterdays back one. It then deletes the day before that. That gives me two days to realize that I deleted the shit. Should be enough. Takes up no extra hard drive space and covers my ass. I think it is a decent idea, but I am open to bitching. I am sure there will be some.
On another note, it would be cool to develop a filesystem driver that makes a second hard-linked copy of the complete filesystem, that is hidden. It then watches and when files are changed it breaks the mirror so that you have a backup copy of the file. All under the surface. If you need it you open a utility or run some command to open the hidden filesystem and you can get your shit back.