From 8fc533643d0acd5cddbdfede1a438a84c57329ba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Mar 2012 20:06:27 -0400 Subject: instructions for using Box.com as a special remote I was sucked in by the 50 gb free lifetime storage offer. Happily, it was pretty easy to get it to work with git-annex. --- doc/special_remotes.mdwn | 10 ++++- doc/tips/using_box.com_as_a_special_remote.mdwn | 50 +++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 doc/tips/using_box.com_as_a_special_remote.mdwn diff --git a/doc/special_remotes.mdwn b/doc/special_remotes.mdwn index ddb2fd125..2d0474ffe 100644 --- a/doc/special_remotes.mdwn +++ b/doc/special_remotes.mdwn @@ -13,7 +13,15 @@ They cannot be used by other git commands though. * [[rsync]] * [[web]] * [[hook]] -* [[tahoe-lafs|forum/tips:_special__95__remotes__47__hook_with_tahoe-lafs]] - limited testing + +The above special remotes can be used to tie git-annex +into many cloud services. Here are specific instructions +for various cloud things: + +* [[tips/using_Amazon_S3]] +* [[tips/Internet_Archive_via_S3]] +* [[tahoe-lafs|forum/tips:_special__95__remotes__47__hook_with_tahoe-lafs]] +* [[tips/using_box.com_as_a_special_remote]] ## Unused content on special remotes diff --git a/doc/tips/using_box.com_as_a_special_remote.mdwn b/doc/tips/using_box.com_as_a_special_remote.mdwn new file mode 100644 index 000000000..2e6f73866 --- /dev/null +++ b/doc/tips/using_box.com_as_a_special_remote.mdwn @@ -0,0 +1,50 @@ +[Box.com](http://box.com/) is a file storage service, currently notable +for providing 50 gb of free storage if you sign up with its Android client. +(Or a few GB free otherwise.) + +With a little setup, git-annex can use Box as a +[[special remote|special_remotes]]. + +## davfs2 setup + +* First, install + the [davfs2](http://savannah.nongnu.org/projects/davfs2) program, + which can mount Box using WebDAV. On Debian, just `sudo apt-get install davfs2` +* Allow users to mount davfs filesystems, by ensuring that + `/sbin/mount.davfs` is setuid root. On Debian, just `sudo dpkg-reconfigure davfs2` +* Add yourself to the davfs2 group. + sudo adduser $(whoami) davfs2 +* Edit `/etc/fstab`, and add a line to mount Box using davfs. + sudo mkdir -p /media/box.com + echo "https://www.box.com/dav/ /media/box.com davfs noauto,user 0 0" | sudo tee -a /etc/fstab +* Create `~/.davfs2/davfs2.conf`: + mkdir ~/.davfs2/ + echo use_locks 0 >> ~/.davfs2/davfs2.conf + echo delay_upload 0 >> ~/.davfs2/davfs2.conf +* Create `~/.davfs2/secrets`. This file contains your Box.com login and password. + Your login is probably the email address you signed up with. + echo "/media/box.com joey@kitenet.net mypassword" > ~/.davfs2/secrets + chmod 600 ~/.davfs2/secrets +* Now you should be able to mount Box, as a non-root user: + mount /media/box.com + +## git-annex setup + +You need git-annex version 3.20120303 or newer, which adds support for chunking +files larger than Box's 100 mb limit. + +Create the special remote, in your git-annex repository. +** This example is non-encrypted; fill in your gpg key ID for a securely +encrypted special remote! ** + + git annex initremote box.com type=directory directory=/media/box.com chunksize=100mb encryption=none + +Now git-annex can copy files to box.com, get files from it, etc, just like +with any other special remote. + + % git annex copy bigfile --to box.com + bigfile (to box.com...) ok + % git annex drop bigfile + bigfile (checking box.com...) ok + % git annex get bigfile + bigfile (from box.com...) ok -- cgit v1.2.3