Table of Contents

Tahoe

Introduction

What is Tahoe

Tahoe LAFS stands for Least Authority File Store. It is a cryptographic key value data store with very interesting features and a filesystem-like overlay:

You can use it to host and serve files or for your backups.
More information is available at:

This page is meant to be a resource of Tahoe knowledge. In the hope of making it as easy as possibly for others to start using it.

Installation (with Tor)

In the installation we configure Tahoe to use Tor. All services are Tor hidden services… such as the Tahoe-LAFS introducer and storage nodes.

Required Packages

  > sudo apt-get install tor torsocks tahoe-lafs

Create Client

  > tahoe create-client

or define the introducer right away:

  > tahoe create-client --introducer=pb://ifwpslh5f4jx2s3tzkkj4cyymrcxcunz@bvkb2rnvjbep4sjz.onion:58086/introducer
  # XXX This command is dangerous because it creates a tahoe.cfg file that tries to "deanonymize" your IP address...
  # XXX You *MUST* set the node's "tub.location" parameter to prevent this deanonymization activity as documented here:
  # XXX https://github.com/david415/tahoe-lafs/blob/tor-i2p-documentation/docs/anonymity-configuration.rst#torsocks-the-old-way-of-configuring-tahoe-lafs-to-use-tor

Configuration

In this step we set the introducer (unless you already did with the tahoe create-client command.
If you did configure the introducer you still have to set tub.location correctly.

Replace tahoe.cfg with everything in https://gist.github.com/david415/7eca8611853caec30467 before “# this section below only works with the “truckee” feature branch” (line 23)

First Steps

Start & Stop Tahoe

  > usewithtor tahoe start
  > tahoe stop

After starting it you open your browser and open 127.0.0.1:7657. This is very useful for diagnostics and some of the Tahoe functionality is available through it, too.

Create Alias

An alias is effectively the root directory of a partition. Before we can store anything a new alias has to be created.

  > tahoe create-alias <PICK_A_NAME>

Operations on your Alias

The alias is always followed by a colon. Let assume we picked the alias myalias. Hence we address it as

  myalias:

File system are similar to their Linux/Unix counterparts. To get the help for a specific one please enter the following on the command line (e.g. for ls):

  > tahoe ls --help
  > tahoe help

List Files

  > tahoe ls <ALIAS>:
  > tahoe ls <ALIAS>:<FOLDER>

Copying Files

Be aware of the colon again!!!

Copy a file to alias.

  > tahoe cp <LOCAL_FILE_PATH> <ALIAS>:<DIRECTORY>

Copy a folder to alias.

  > tahoe cp --recursie <LOCAL_FOLDER> <ALIAS>:<DIRECTORY>

Backup Files

Create Backup

  > tahoe backup <FILE_OR_FOLDER> <ALIAS>:<BACKUP_DIRECTORY>

Afterwards we can ls the new backup folder

  > tahoe ls <ALIAS>:<BACKUP_DIRECTORY>

Within it we now see two folders: Latest and Archves. Let's see what they contain.

  > tahoe ls <ALIAS>:<BACKUP_FOLDER>/Latest
  > tahoe ls <ALIAS>:<BACKUP_FOLDER>/Archives

The Archive folder includes further directories with timestamped versions of our backup.

Backup Integrity

Tahoe spreads chunks of our files over different shares. Should too many shares go offline our backup will be lost. This is why we should check it's health on a regular basis. This is done with Tahoe's deep-check command.

  > tahoe deep-check <ALIAS>:<BACKUP_FOLDER>

The resulting output looks like this:

  > tahoe deep-check ouralias:bar3
  > done: 4 objects checked, 4 healthy, 0 unhealthy

Shares will go offline. And there's also a happy threshold (defined in your tahoe.cfg). Keeping our backup above the happy threshold is achieved by adding a parameter to the deep-check command.

  > tahoe deep-check --repair <ALIAS>:<BACKUP_FOLDER>

Shares also have a garbage collection policy. When a file hasn't been accessed for too long it is elligible for removal. This prevents shares from running out of disk space too early.
To keep them alive you to renew their so calles lease.

  > tahoe deep-check --repair --add-lease <ALIAS>:
  > tahoe deep-check --repair --add-lease <ALIAS>:<BACKUP_FOLDER>
  > tahoe deep-check --repair --add-lease <ALIAS>:<BACKUP_FOLDER>/<SUB_DIRECTORY>

Restore from Backup

Restoring files involves only a copy.

  > tahoe cp <ALIAS>: <LOCAL_FOLDER>
  > tahoe cp <ALIAS>:<FOLDER> <LOCAL_FOLDER>
  > tahoe cp <ALIAS>:<FOLDER>/<FILE> <LOCAL_FOLDER>

Missing Sections