Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two copies of my music files, one on a desktop Linux machine, one on a Macbook. At the moment, I run rsync periodically to keep these files in sync. I'd like to move management of this problem to git annex, but was wondering what the cleanest way to start would be.

In particular, if I independently do

git init
git annex init "My music on <Laptop|Desktop>"

on both machines, what should I then do to get annex to take over synchronisation without needing a big synchronisation step subsequently?

share|improve this question
    
This might be a start: [syncing non-git trees with git-annex ](git-annex.branchable.com/forum/…) –  Joel Purra Oct 25 '13 at 8:59

1 Answer 1

up vote 1 down vote accepted

I have done exactly that a while ago and documented this on the official tips section of the git-annex website.

Basically, the answer is that, since git-annex performs decentralised deduplication, there won't be a big sync. So on each machine, you can do:

git init
git annex init "My music on <Laptop|Desktop>"
git annex add .
git commit -m "git annex yay"

Then on one of the machines (the laptop, i would suggest), add the other (the desktop) as a remote:

git remote add desktop desktop.me.example.com:/srv/music
git annex sync desktop

The last sync operation only syncs metadata, mind you, that is the location tracking data, basically. To copy files around, you will actually want git annex copy or .. move. Using those techniques, I have been able to keep a smaller subset of my music collection on my laptop fairly reliably, and even manage it (e.g. rename files, import new files) while being offline while never worry about losing files.

share|improve this answer
    
Thanks for the answer! –  Michael Norrish Apr 1 at 3:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.