Git-annex Archive with Git-annex Assistant

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

A web interface is available for easier configuration and setup of git-annex. This handles the configuration of multiple repositories, including automatic synchronization. The following setup's objective is to move all archive file contents into the archive directory. A local symbolic link remains available, but is empty.

Create and Archive on an External Hard Drive

Managing the Files with Archive

File contents that are moved to the archive folder on the client repo will be automatically moved to the external hard drive. The symbolic link to the file will remain available on the client::

:~/annex$ git annex whereis .
whereis debhelper-slides.pdf (1 copy) 
  	7d77193a-7839-47c1-bea6-7b2edc18bf0f -- here (gschoenb@gschoenb-X220:~/annex)
ok
:~/annex$ mv debhelper-slides.pdf archive/
:~/annex$ git annex whereis .
whereis archive/debhelper-slides.pdf (1 copy) 
  	ce9b157f-689b-44bf-9187-11eca98e81e9 -- lexar (USB Archiv)
ok

The file contents are therefore located on the external hard drive:

:~/annex/archive$ ls -lh
total 4.0K
lrwxrwxrwx 1 gschoenb gschoenb 201 Oct 16 10:50 debhelper-slides.pdf -> ../.git/annex/objects/32
/64/SHA256E-s1988981--8aaa02dda217bbabd79a11a5f93fdd4ca8ae4e723c86b4bb91c69d4095a84006.pdf/SHA256E
s1988981--8aaa02dda217bbabd79a11a5f93fdd4ca8ae4e723c86b4bb91c69d4095a84006.pdf

If the file is removed from the archive, its contents are automatically retrieved from the external hard drive:

:~/annex$ mv archive/debhelper-slides.pdf .
:~/annex$ ls -lh
total 2.0M
drwxrwxr-x 2 gschoenb gschoenb 4.0K Oct 16 10:54 archive
-rw------- 1 gschoenb gschoenb 1.9M Oct 16 10:54 debhelper-slides.pdf

Screen Casts

The following videos also illustrate the use of the web interface:


Author: Georg Schönberger

Related articles

Git Basic Commands
Git Basics
Git-annex Repository on an External Hard Drive