Tarsnap general usage

The examples here assume that you are using a Tarsnap configuration file including keyfile and cachedir directives. The sample configuration file provided with Tarsnap specifies these (the default keyfile location is /root/tarsnap.key, and the default cache directory location is /usr/local/tarsnap-cache).

Create an archive named "mybackup" containing /usr/home and /other/stuff:
tarsnap -c -f mybackup /usr/home /other/stuff
Create another archive a day later from the same directories; this will be much faster because Tarsnap will recognize and avoid uploading data which was stored previously:
tarsnap -c -f anotherbackup /usr/home /other/stuff
List all the archives which have been stored:
tarsnap --list-archives
Delete the first archive, leaving the second archive intact:
tarsnap -d -f mybackup
List the files in the "anotherbackup" archive
tarsnap -tv -f anotherbackup
Restore two users' home directories
tarsnap -x -f anotherbackup usr/home/auser usr/home/anotheruser

Tarsnap cache directory

The tarsnap -c and tarsnap -d (archive creating and deleting) operations use a "cache directory" which allows Tarsnap to identify which blocks of data have been previously stored; this directory is specified via the cachedir directive in the Tarsnap configuration file or via the --cachedir option to Tarsnap. If the cache directory is lost or out of date, the tarsnap -c and tarsnap -d operations will exit with an error message instructing you to run tarsnap --fsck to regenerate the cache directory.