It was once common for newspapers to reprint an important article from time to time.
Of course, this was before Google and in those days it wasn’t all that easy to lay your hands on an article that you just remembered seeing somewhere. Heck, it wasn’t easy if you remembered exactly where you saw it.
Reference librarians were gods then.
In that spirit, I’d like to “reprint” this article from Jamie Zawinski. It has one of my favorite quotes in it (“the universe tends toward maximum irony”), offers great advice, and does it in a way that’s easily absorbed and implemented. I’ve tweaked it just enough to skirt the explicit tag:
Hello, this is a public service announcement. I am here to tell you about backups. It’s very simple.
Option 1: Learn not to care about your data. Don’t save any old email, use a film camera, and only listen to physical CDs and not MP3s. If you have no posessions, you have nothing to lose.
Option 2 goes like this:
You have a computer. It came with a hard drive in it. Go buy two more drives of the same size or larger. If the drive in your computer is SATA2, get SATA2. If it’s a 2.5″ laptop drive, get two of those. Brand doesn’t matter, but physical measurements and connectors should match.
Get external enclosures for both of them. The enclosures are under $30.
Put one of these drives in its enclosure on your desk. Name it something clever like “Backup”. If you are using a Mac, the command you use to back up is this:
sudo rsync -vaxE –delete –ignore-errors / /Volumes/Backup/
If you’re using Linux, it’s something a lot like that. If you’re using Windows, go f*ck yourself.
If you have a desktop computer, have this happen every morning at 5AM by creating a temporary text file containing this line:
0 5 * * * rsync -vaxE –delete –ignore-errors / /Volumes/Backup/
and then doing sudo crontab -u root that-file
If you have a laptop, do that before you go to bed. Really. Every night when you plug your laptop in to charge.
If you’re on a Mac, that backup drive will be bootable. That means that when (WHEN) your internal drive scorches itself, you can just take your backup drive and put it in your computer and go. This is nice.
When (WHEN) your backup drive goes bad, which you will notice because your last backup failed, replace it immediately. This is your number one priority. Don’t wait until the weekend when you have time, do it now, before you so much as touch your computer again. Do it before goddamned breakfast. The universe tends toward maximum irony. Don’t push it.
That third drive? Do a backup onto it the same way, then take that to your office and lock it in a desk. Every few months, bring it home, do a backup, and immediately take it away again. This is your “my house burned down” backup.
“OMG, three drives is so expensive! That sounds like a hassle!” Shut up. I know things. You will listen to me. Do it anyway.
Addendum A:
Mac users: for the backup drive to be bootable, you need to do two things:
When you first format the drive, set the partition type to “GUID”, not “Apple Partition Map”;
Before doing your first backup, Get Info on the drive and un-check “Ignore ownership on this drive” under “Ownership and permissions.”
You can test whether it’s bootable by holding down Option while booting and selecting the external drive.
Addendum B:
RAID is a waste of your goddamned time and money. Is your personal computer a high-availability server with hot-swappable drives? No? Then you don’t need RAID, you just need backups.
I follow this procedure for the most part, but I use a newer version of rsync (installed 3.0.7 via macports) than the one that ships with Snow Leopard (2.6.9) and launch the nightly backups by placing a script in the /etc/periodic/daily directory. With this somewhat newer version of rsync, I use this set of switches:
/opt/local/bin/rsync -vaxAX –delete –ignore-errors / /volumes/backup