This special remote type stores file contents in directory.

One use case for this would be if you have a removable drive that you want to use it to sneakernet files between systems (possibly with encrypted contents). Just set up both systems to use the drive's mountpoint as a directory remote.

configuration

These parameters can be passed to git annex initremote to configure the remote:

  • encryption - Required. Either "none" to disable encryption of content stored in the directory, or a value that can be looked up (using gpg -k) to find a gpg encryption key that will be given access to the remote. Note that additional gpg keys can be given access to a remote by rerunning initremote with the new key id. See encryption.
  • chunksize - Avoid storing files larger than the specified size in the directory. For use on directories on mount points that have file size limitations. The default is to never chunk files.
    The value can use specified using any commonly used units. Example: chunksize=100 megabytes
    Note that enabling chunking on an existing remote with non-chunked files is not recommended.

Setup example:

# git annex initremote usbdrive type=directory directory=/media/usbdrive/ encryption=none
# git annex describe usbdrive "usb drive on /media/usbdrive/"

Thanks for this great tool! I was wondering what the differences are between using type=directory, type=rsync, or a bare git repo for directories?

I guess I can't use just a regular repo because my USB drive is formatted as vfat -- which threw me for a loop the first time I heard about git-annex about a year ago, because I followed the walkthrough, and it didn't work as expected and gave up (now I know it was just a case of PEBKAC). It might be worth adding a note about vfat to the "Adding a remote" section of the walkthrough, since the unstated assumption there is that the USB drive is formatted as a filesystem that supports symlinks.

Thanks again, my scientific data management just got a lot more sane!

The directory and rsync special remotes intentionally use the same layout. So the same directory could be set up as both types of special remotes.

The main reason to use this rather than a bare git repo is that it supports encryption.

Comment by http://joeyh.name/ Mon Jun 25 15:29:29 2012
Comments on this page are closed.