Tech Blog - Backups for Linux Audio Recordings

If you spend a lot of time recording, you don’t want those recordings to suddenly go away. Enter backups.

Audio recording backups are special: You have big files that don’t change, and little files that change all the time. You can’t just copy everything onto a spare hard drive after every session, because it would fill up quickly. But you can’t just overwrite the old backup, you might mess something up and not notice until you’ve backed up the mess and overwritten the last good copy. Dilemma!

Good luck dilemmas have a tendency to cook up solutions when they get stared at long enough, and boy somebody must have done a lot of staring to come up with… drum roll! The snapshot.

A snapshot is a directory copy with a twist. Here’s the thing: Each time you snapshot a directory full of files, only new files or changed files eat space. The old ones just get linked up with the other snapshots. So your big files only eat space once, because they don’t change. The little files eat space every time, but it doesn’t matter, because they’re little.

Neat, huh?

Sound familiar? Well, it’s like going back in time. Apple thought so too, so when they went and made a snapshot maker, they called it “time machine”.

There is a very satisfying command line snapshot program for linux, called rsnapshot. You can install it with your linux package manager, or from here:

http://rsnapshot.org/

On my backup hard drive, I created a file /media/my-hard-drive-uuid/backup/rsnapshot/rsnapshot.conf with these contents:

1
2
3
4
5
6
7
8
9
10
11
12
13
config_version  1.2
snapshot_root /media/my-hard-drive-uuid/backup/rsnapshot
no_create_root  1
cmd_cp    /bin/cp
cmd_rm    /bin/rm
cmd_rsync /usr/bin/rsync
cmd_logger  /usr/bin/logger
cmd_du    /usr/bin/du
interval  manual  99999
verbose   2
loglevel  3
lockfile  /var/run/rsnapshot.pid
backup  /home/my-user-directory localhost/

And do snapshots like this:

sudo snapshot -c /media/my-hard-drive-uuid/backup/rsnapshot/rsnapshot.conf

I usually run one after each recording or editing session.

I’m lazy, so I just snapshot my entire home directory. You can get more sophistiacted and change /home/my-user-directory to something like /home/my-user-directory/recordings. You really need not get any more sophisticated than that, although you can.

The Future ™: To make things easier people at btrfs and nilfs are working on putting snapshots into the file system. You can try it, but they put big warning labels in their tools that say: If you put something here you might never see it again. I don’t know about you, but it made me want to stick with rsnapshot for now.

On another note: The cheapest way to get your files out of your computer seems to be this baby:

dock

You use internal hard drives like big floppy disks. So they don’t break, you wrap them in latex. Nice!

Post a Comment

Your email is never shared. Required fields are marked *

*
*