I've been using git-annex for a few months now and I have been longing the capability to plug in arbitrary remotes/backends and that support has arrived in the form of special_remotes/hook.

At first I wanted to integrate irods or sector/sphere, then it occured to me that tahoe-lafs would a good match for doing my backups and just managing my data that I want to preserve (with resources that I find available around the office/labs).

Assuming you have a recent copy of git-annex which supports this new special remote hook, you could do something similar to this

git config annex.tahoe-store-hook 'tahoe mkdir tahoe:$ANNEX_HASH_1/$ANNEX_HASH_2 && tahoe put $ANNEX_FILE tahoe:$ANNEX_HASH_1/$ANNEX_HASH_2/$ANNEX_KEY'
git config annex.tahoe-retrieve-hook 'tahoe get tahoe:$ANNEX_HASH_1/$ANNEX_HASH_2/$ANNEX_KEY $ANNEX_FILE'
git config annex.tahoe-remove-hook 'tahoe rm tahoe:$ANNEX_HASH_1/$ANNEX_HASH_2/$ANNEX_KEY'
git config annex.tahoe-checkpresent-hook 'tahoe ls tahoe:$ANNEX_HASH_1/$ANNEX_HASH_2/$ANNEX_KEY 2>&1 || echo FAIL'
git annex initremote library type=hook hooktype=tahoe encryption=none
git annex describe 1d1bc312-7243-11e0-a9ce-5f10c0ce9b0a library

The above assumes that the user understands how tahoe-lafs works and knows how to configure and use tahoe-lafs. In the above example the default tahoe: name space is used. It would probably be a good idea to create a new tahoe-lafs alias/namespace (I think it is called a DIR-CAP in tahoe speak) to store git-annex'd files.

I've just been testing so far with the above, it's a little slow, but for dumping data to a private cloud it's fine. I need to redirect some of the output to /dev/null after I am satisfied with the overall behaviour of the system. So far git-annex has been great for me for archiving and tracking research data and projects which I no longer need on my primary system.


Related posts:

Memory debuggers and garbage collectors for C/C++
Posted

Alternatives to using GOLD, Maui for accounting and banking for HPC systems
Posted

The ultimate sandbox game, ever!
Posted

Creating a git branch with no ancestry
Posted

Using gource to visualise projects stored in version control
Posted

Bookmark and Share