How to start syncing two existing directories with git annex?
Sean Hammond
snhmnd at gmail.com
Wed Nov 27 12:45:40 CET 2013
On 26.11.2013 15:51, Sean Hammond wrote:
>> Thanks all. I'm going to try the simplest method: just run git annex
>> assistant on both machines, drag the music dir into the annex on both
>> machines, and let it deal with it. Some unnecessary transferring and
>> temporary on-disk duplication should not be a problem. I've made a
>> backup first, just in case.
>
> I think it worked. Git annex assistant did a lot of transferring, and
> when it was eventually done the number of files and size of the
> ~/Annex/Music dir is exactly the same on both machines, and the files
> look fine.
>
> The ~/Annex/.git dirs are quite big though: 640M and 1.5G. I ran git gc
> --aggressive --prune on them, and got them down to 180M and 894M. That
> still seems surprisingly large but I guess it's not big enough to cause
> a problem.
Ok, I added several folders to the annex and it synced them all. It's
now stopped syncing, (even after restarting git-annex and
git-annex-webapp on both machines, it doesn't sync anymore), and if I
add a text file on A I can see it appear on B and vice-versa, so it
seems to be working.
But I noticed a number of problems:
1. The total number of files in ~/Annex, not including .git, on A and B
is different:
ls -R1 ~/Annex | wc -l
21830
ls -R1 ~/Annex | wc -l
21845
2. git-annex status shows untracked and modified files on both machines
(different files on each machine).
3. On each machine, 7 files have been replaced with broken symlinks to
files in .git/objects. This time it is the same files on both machines,
so it looks as if git-annex might have lost these files from both
machines. git-annex fsck finds these 7 and reports them as 'No known
copies exist'.
4. Even after running git gc --aggressive --prune and git-annex
dropunused, the .git directories are massive: 23G and 2.5G, for just
~20,000 files.
I've tried git-annex fsck and repair but that doesn't seem to have
helped the problems. I could git-annex add and sync the files that are
reported as untracked. The ones that are reported as modified, and the
ones that are broken symlinks, I'm not sure what to do with.
More information about the vcs-home
mailing list