====== Tahoe ====== ===== Introduction ===== ==== What is Tahoe ==== [[https://tahoe-lafs.org/|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: * cryptographic capabilities model which acts like a distributed access control system * erasure-encoding * verified end-to-end crypto You can use it to host and serve files or for your backups.\\ More information is available at: * [[https://tahoe-lafs.org/trac/tahoe-lafs/wiki/Doc|Tahoe Documentation]] * [[https://tahoe-lafs.org/trac/tahoe-lafs/wiki/FAQ|Tahoe FAQ]] 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|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|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 ===== 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 : > tahoe ls : ==== Copying Files ==== Be aware of the colon again!!! Copy a file to alias. > tahoe cp : Copy a folder to alias. > tahoe cp --recursie : ==== Backup Files ==== === Create Backup === > tahoe backup : Afterwards we can //ls// the new backup folder > tahoe ls : Within it we now see two folders: //Latest// and //Archves//. Let's see what they contain. > tahoe ls :/Latest > tahoe ls :/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 : 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 : 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 : > tahoe deep-check --repair --add-lease : > tahoe deep-check --repair --add-lease :/ === Restore from Backup === Restoring files involves only a copy. > tahoe cp : > tahoe cp : > tahoe cp :/ ===== Missing Sections ===== * links * capabilities: description, usage, etc * setup your own grid * setup a node and add it to an existing grid