Difference between revisions of "INTERNETARCHIVE.BAK/git-annex implementation"

From Archiveteam
Jump to navigation Jump to search
(→‎Status: new subsection)
Line 25: Line 25:
 
* Client runtime environment (docker image maybe?) with warrior-like interface (all that needs to do is configure things and get git-annex running)
 
* Client runtime environment (docker image maybe?) with warrior-like interface (all that needs to do is configure things and get git-annex running)
  
= shard1 =
+
= SHARD1 =
  
 
This is our first part of the IA that we want to get backed up. If we succeed, we will have backed up 1/1770th of the Internet Archive.
 
This is our first part of the IA that we want to get backed up. If we succeed, we will have backed up 1/1770th of the Internet Archive.
Line 39: Line 39:
 
* size of the git repository itself is 51 megabytes
 
* size of the git repository itself is 51 megabytes
  
== tuning your repo ==
+
== Tuning your repo ==
  
 
So you want to back up part of the IA, but don't want this to take over your whole disk or internet pipe? Here's some tuning options you can use.. Run these commands in IA.BAK/shard1 git repo.
 
So you want to back up part of the IA, but don't want this to take over your whole disk or internet pipe? Here's some tuning options you can use.. Run these commands in IA.BAK/shard1 git repo.
Line 60: Line 60:
  
 
now run git clone SHARD1@124.6.40.227:shard1 on the location you want to save this data and run git annex get in a screen or tmux.
 
now run git clone SHARD1@124.6.40.227:shard1 on the location you want to save this data and run git annex get in a screen or tmux.
 +
 +
== Status ==
 +
 +
You can find an initial graph of the status of the testing shard [http://teamarchive1.fnf.archive.org/ia.bak/ here], and exact numbers [http://iabak.archiveteam.org/stats/SHARD1 here].

Revision as of 18:22, 1 April 2015

This page addresses a git-annex implementation of INTERNETARCHIVE.BAK.

For more information, see http://git-annex.branchable.com/design/iabackup/

First tasks

Some first steps to work on:

  • Get a list of files, checksums, and urls. (done)
  • Write a script to generate a git-annex repository with 100k files from the list. (done)
  • Set up a server to serve up the git repos. Any linux system with a few hundred gb of disk and ssh and git-annex installed will do. It needs to accept incoming ssh connections from registered clients, only letting them run git-annex-shell. (done)
  • Put one shard repo on the server to start. (done)
  • Manually register a few clients to start, have them manually download some files, and `git annex sync` their state back to the server. See how it all hangs together. (in progress)
  • Get that first shard backed up enough to be able to say, "we have successfully backed up 1/1770th of the IA!"

Middle tasks

  • Test a restore of that first shard. Tell git-annex the content is no longer in the IA. Get the clients to upload it to our server.

Later tasks

  • Create all 1770 shards, and see how that scales.
  • Write pre-receive git hook, to reject pushes of branches other then the git-annex branch (already done), and prevent bad/malicious pushes of the git-annex branch
  • Write client registration interface, which generates the client's ssh private key, git-annex UUID, and sends them to the client
  • Client runtime environment (docker image maybe?) with warrior-like interface (all that needs to do is configure things and get git-annex running)

SHARD1

This is our first part of the IA that we want to get backed up. If we succeed, we will have backed up 1/1770th of the Internet Archive. This git-annex repository contains 100k files, the entire collections "internetarchivebooks" and "usenethistorical".

To help backing up shard1, checkout this git repository: <https://github.com/ArchiveTeam/IA.BAK>

The iabak script will set you up and get you downloading files from the IA into your backup drive.

Some stats about the files this repository is tracking:

  • number of files: 103343
  • total file size: 2.91 terabytes
  • size of the git repository itself is 51 megabytes

Tuning your repo

So you want to back up part of the IA, but don't want this to take over your whole disk or internet pipe? Here's some tuning options you can use.. Run these commands in IA.BAK/shard1 git repo.

git config annex.diskreserve 200GB

This will prevent git-annex from using up the last 200gb of your disk. Adjust to suite.

git config annex.web-options=--limit-rate=200k

This will limit wget/curl to downloading at 200 kb/s. Adjust to suite.

Ubuntu setup

First, create an ssh key, run ssh-keygen and send the id-rsa.pub to Closure (irc!)

Next, add the ppa for git-annex, the default git-annex is too old. https://launchpad.net/~jtgeibel/+archive/ubuntu/ppa?field.series_filter=trusty

Run git-annex version and make sure you are at git-annex version: 5.20150327~ubuntu14.04.1~ppa3 or above.

now run git clone SHARD1@124.6.40.227:shard1 on the location you want to save this data and run git annex get in a screen or tmux.

Status

You can find an initial graph of the status of the testing shard here, and exact numbers here.