Tarsnap review

In: Internets

22 Dec 2009

About two weeks ago I ran into a mention of Tarsnap somewhere. It being billed as “online backups for the truly paranoid” made me read with interest, seeing as the “truly paranoid” part really fit the bill with me.

The backups: incremented snapshot backups where you’re paying for storage and transfer but duplicate data is NOT UPLOADED nor BILLED… You get all the benefits of actual entire snapshots, while paying for incremental backups. It’s pretty unfuckingbelievable.

The security: imagine you can have only a write key on the machine you’re backing up and should somebody break into it, they will only be able to create new backups, not screw with your old ones. I mean, isn’t that what security is for?

The miracle(s): it’s so simple, any command line idiot can set it up… It’s dirt cheap… It works.

The fact that the service is run by just one person makes me feel great, considering the guy’s the FreeBSD Security Officer and a short email exchange I’ve had with him made me realize he truly is paranoid, at least in the good sense :)

Just to show how I’m using it this is what my crontab looks like for automating my tarsnap backups:
$crontab -l
0 2 * * * /usr/bin/mysqldump -A -x -uroot -pYEAHRIGHTLIKEIMGONNAPUBLISHTHAT > /root/.mysqlbackup/`date '+\%Y\%m\%d'`.sql
5 2 * * * /usr/local/bin/tarsnap -c -f mysql-`date '+\%Y\%m\%d'` /root/.mysqlbackup/`date '+\%Y\%m\%d'`.sql
10 2 * * * /bin/rm /root/.mysqlbackup/`date '+\%Y\%m\%d'`.sql
15 2 * * * /usr/local/bin/tarsnap -c -f www-`date '+\%Y\%m\%d'` /var/www /etc/nginx /etc/php5 /etc/mysql

So, at 2 AM it dumps all the SQL databases to /root/.mysqlbackup/CURRENTDATE.sql
5 minutes later, that SQL file gets backed up as snapshot mysql-CURRENTDATE
Another 5 minutes later, that SQL file gets deleted.
At 2:15 AM my www folder and all my related configs get backed up as www-CURRENTDATE

Note: I have a passwordless write only key saved as /root/.tarsnap.key and /root/.tarsnaprc looks like this:
cachedir /var/cache/tarsnap
keyfile /root/.tarsnap.key

Tarsnap

Snapshotted really secure online backups at incremental prices

Phenomenal secure backup product. I’m in geek love with it.

My rating: 5.0 stars
*****

2 Responses to Tarsnap review

Avatar

Pieter

December 23rd, 2009 at 2:02 am

You’d be much better off chaining those commands in a shell script. That way you can make sure that the commands are only run if all of them succeed and processes won’t interfere if one of them is long-running (for example, by having a flaky internet connection)

Avatar

TJ

December 23rd, 2009 at 3:08 am

You’re right, of course.

I do think I’ll be putting them in a script to also email the results BUT the good thing about not having made sure everything works is that it’s been keeping me on my toes to actively check out my current snapshot list from my computer, using the archive read key, and to actually do test restores :)

Comment Form

About this blog

Outlet for giving a crap.

Services I like enough to recommend

Subscribe via Email

Enter your email address:

Delivered by FeedBurner

Twitter: intlect