Getting started with Tarsnap
Before you can use Tarsnap to store your backups, there are four steps which you have to complete:
- Signing up for a Tarsnap account.
- Installing the Tarsnap client code.
- Depositing some money into your Tarsnap account.
- Registering the machines on which you will be using Tarsnap.
Each of these steps are described in more detail below.
1. Sign up for a Tarsnap account
Go to the Tarsnap registration page, enter your email address, pick a password and enter it twice, and agree to the Tarsnap terms and conditions. Hit Submit.
You will receive an email asking you to confirm your registration. (This serves two purposes: First, it ensures that people don't mistype their email addresses; and second, it makes sure that people can't be registered against their will.)
Follow the link provided in the registration confirmation email and type in your password again, and your account will be created.
2. Install the Tarsnap client code
Go to the Tarsnap client code download page and follow the instructions to download and install the Tarsnap client code.
When Tarsnap is installed, a sample configuration file is installed into /usr/local/etc/tarsnap.conf.sample; you may wish to move or copy this to /usr/local/etc/tarsnap.conf.
3. Deposit funds into your account
Tarsnap operates on a prepaid basis (like many mobile phones), so you have to add funds to your account before you can use it. To do this, log into the Tarsnap account management interface and click on "Add funds to your account" to send in a payment of $5 or more.
4. Register machines
As part of the Tarsnap client code, there is a utility called tarsnap-keygen which registers a machine with the Tarsnap server. This serves two purposes: First, because you have to enter your password (the one you set when you created your account), it confirms to the server that the machine's usage should be charged to your account; second, the tarsnap-keygen utility generates cryptographic keys used to encrypt and sign the machine's backups.
To register a machine with the Tarsnap server, run
tarsnap-keygen --keyfile /root/tarsnap.key --user firstname.lastname@example.org --machine mybox
(with appropriate values substituted) and enter your Tarsnap account password when prompted. This will create a key file in /root/tarsnap.key which Tarsnap can use to store, restore, and delete archives. STORE THIS FILE SOMEWHERE SAFE! Copy it to a different system, put it onto a USB disk, give it to a friend, print it out (it is printable text) and store it in a bank vault — there are lots of ways to keep it safe, but pick one and do it. If you lose the Tarsnap key file, you will not be able to access your archived data.
If you have multiple machines, you almost certainly want to create a separate key file for each machine.
Once you've created key file(s), you're ready to start using Tarsnap. If you've ever used the UNIX tar utility, you'll probably be able to go from here on your own — if not, you may wish to read the general usage instructions or the Tarsnap man page.