The abundance of personal backup

It's 2009. The Bandwidth of a consumer Internet connection is going up. Laptop computers are ubiquitous, small storage devices are everywhere and can meet or exceed internal storage, everyone's making movies, sounds, pictures on their computers. I'm doing this. But where the fuck am I going to put this stuff when I don't want it available on the laptop but I don't want to delete it? There are a lot of solutions to this problem. Most notable is Apple's TimeMachine product, which makes the decision for you by dedicating an entire external USB disk to the role of incremental backup. But what if I want to control what gets backed up and what doesn't? Some things should not be backed up. Cache files, auto generated image thumbnails, temporary files, garbage directories generated by OS X, private documents with very particular accounting of where each copy resides. Apple has taken the road of abundance and thrown assumptions of privacy and efficiency out with the bathwater. Fortunately, OS X and GNU/Linux have neato user obsequious tools like rsync and rdiff-backup. For my Mac, I wrote a simple script that backs up my entire home directory in one command with an optional file to exclude directories to backup.

#!/bin/sh
EXCLUDE_FILE="$HOME/bin/full_backup.exclude"
rsync -rv --progress --stats --exclude-from=$EXCLUDE_FILE $HOME/ $1

Search for EXCLUDE PATTERNS in the rsync manpage for the exclude patterns file format. Basically, one on each line with shell wildcards accepted. This will copy everything in my home directory except for the files (or patterns) in the .exclude file to a directory passed in as an argument at runtime. It will also give you an realtime progress meter for each file! Neato.


Written on 2009-05-24 18:00:05 UTC

Back

I have an honorary degree in software engineering from the university of the Internet. I propose to a different friend on facebook every monday. I'm single on weekends, which is when I hack on things like web programming, sound synthesis and databases. I hack on drop.io when I'm married.

Chat?



Photos

Music

lazzarello's Profile Page

RSS Feed

New post