Tarsnap - Online backups for the truly paranoid

Navigation menu

Flexibility

What's the most flexible and widely used archiving tool on UNIX-like systems? Tar. Many different versions of tar have existed since it first appeared in Seventh Edition Unix in January 1979, and rare is the user of a UNIX-like system who hasn't at some point typed tar -xf foo.tar or tar -cf backup.tar ~/myfiles — most software (Tarsnap included) is distributed as tar archives.

As the name suggests, Tarsnap is closely related to tar; aside from a few additional options, their command-line interfaces are identical. When you create an archive with Tarsnap, you can specify any list of files or directories to archive (either at the command line or, using the -T option, from a file); you can set the nodump flag on files and directories and use the --nodump option to tell Tarsnap to ignore them; and you can use the --exclude option to tell Tarsnap to ignore files matching particular patterns (e.g., --exclude *.core to ignore core dumps).

In fact, Tarsnap is even more flexible than tar. Unlike backup systems (tar included) which work on a "full plus incrementals" model of backups — that is, you start by creating an archive containing everything, and thereafter you create archives which only contain modified files — Tarsnap works on a snapshotting model: Every Tarsnap archive acts like it is completely independent of all other archives. (Tarsnap has magic going on behind the scenes to efficiently store archives, so you get the same or better performance than the full-plus-incrementals model provides.)

As a result, you can forget everything which used to make backups complicated. If you want to create an archive containing a bunch of files, you can just run

tarsnap -c -f archivename /paths/to/whatever/stuff /you/want/to/archive

and that archive will remain intact, regardless of what you do with other stored archives, until you run

tarsnap -d -f archivename

to delete it. With Tarsnap there are no rules to remember about when you can create or delete archives; you can do either whenever you want.