jasonwryan.com

Miscellaneous ephemera…

Tarsnap

image

I have been using Tarsnap for a couple of months now to backup my EeePC. Tarsnap’s (superb) tagline is: online backups for the truly paranoid.

Essentially, Tarsnap stores your encrypted backups on Amazon’s S3 servers, recognizes duplicate data and avoids storing it again, and only deletes data once no remaining archives require it. I can recommend it as a terrific service for a number of reasons.

It is secure. Developed by the FreeBSD Security Officer, there is a bug bounty for anyone who does discover bugs or security holes. It is very reasonably priced. It is reliable. And most importantly, Dr Colin Percival, erstwhile child prodigy and developer, is extremely helpful either on the mailing list or IRC if you have any questions or need help.

If, however, you have a quick look at the man page, you will see that it is not exactly a simple application. After a couple of months of trying to remember all of the relevant flags, I searched for a script that would simplify the process for me. There are a few online, but they are all intended to fully automate the process (which makes sense for something like backups)…

What I was looking for, however, was something more interactive: more along the lines of a prompt. So, realizing I would have to scratch my own itch, I wrote a wrapper script to assist my failing memory.

The script prints out a menu of the available options and, once you have selected the activity that you would like (creating a new snapshot, deleting an old one etc.,), then the script checks if any further input is required, for example, the name of the snapshot to delete, and then executes it. It is nothing flash, but it works…

image

You can grab the script from my mercurial repo. It’s written in bash, but if you require portability, it shouldn’t be too hard to tweak.

Updated 3/10/11

I have rewritten the script to be POSIX compliant and also to better conform to basic UNIX behaviours, in terms of the options etc. It should now be good to run in most shells.

Notes

Creative Commons licensed image by Declan TM

Comments