forum/Debugging of transfer considerationsgit-annexhttp://git-annex.branchable.com/forum/Debugging_of_transfer_considerations/git-annexikiwiki2017-04-07T20:29:33Zcomment 1http://git-annex.branchable.com/forum/Debugging_of_transfer_considerations/comment_1_e68ab187c15b3b6f9384a990da07f358/joey2017-03-06T16:24:30Z2017-03-06T16:08:55Z
<p>Currently the best way to debug this kind of thing is to use git annex find
with options to find files that match the preferred content expression.
Once you have gotten git annex find to list the same files that are being
transferred, you can then modify/cut down the options to narrow down
what's going on.</p>
<p>The preferred content expression for a client repository is:</p>
<pre><code>(include=* and ((exclude=*/archive/* and exclude=archive/*) or (not (copies=archive:1 or copies=smallarchive:1)))) or approxlackingcopies=1
</code></pre>
<p>Translating this to command-line options:</p>
<pre><code>git annex find '-(' '--include=*' --and '-(' '-(' '--exclude=*/archive/*' --and '--exclude=archive/*' '-)' --or '-(' --not '-(' --copies=archive:1 --or --copies=smallarchive:1 '-)' '-)' '-)' '-)' --or --approxlackingcopies=1
</code></pre>
<p>You'll want to run that when the files are not located in the archive/
directory, and run it from the top of the repository.</p>
<p>Assuming that lists the files that are getting transferred, then you can
split it into two commands, each of which checks one of the two parts
of the expression that are ORed together:</p>
<pre><code>git annex find '-(' '--include=*' --and '-(' '-(' '--exclude=*/archive/*' --and '--exclude=archive/*' '-)' --or '-(' --not '-(' --copies=archive:1 --or --copies=smallarchive:1 '-)' '-)' '-)' '-)'
git annex find --approxlackingcopies=1
</code></pre>
<p>Assuming the first of those lists the files and not the second, you can
then split it further. The include=* part must be matching then, so
checking two parts ORed within the second part:</p>
<pre><code>git annex find '-(' '--exclude=*/archive/*' --and '--exclude=archive/*' '-)'
git annex find '-(' --not '-(' --copies=archive:1 --or --copies=smallarchive:1 '-)' '-)'
</code></pre>
<p>Probably one of those will list the files and the other won't.
Which will point fairly strongly at what's happening.</p>
comment 2http://git-annex.branchable.com/forum/Debugging_of_transfer_considerations/comment_2_f7cd207b08fe365d0a6248316c91ed78/Horus2017-03-14T08:58:54Z2017-03-14T08:58:54Z
Maybe it's the problem that the client group requires a file in archive/ to reach a archive repo, not a backup repo. To combine the behavior of both, I have set the group to archive and wanted to anything.
comment 3http://git-annex.branchable.com/forum/Debugging_of_transfer_considerations/comment_3_508b5b4155f0f9c0c2a7d2e990a1bf92/joey2017-04-07T20:29:33Z2017-04-07T20:26:54Z
<p>Yes, files in archive/ directories are only dropped from clients once they
reach an archive. Backup repositories are not considered to be archives.</p>
<p>Of course, you can tweak the preferred content expressions to change this
behavior.</p>
<p>I don't know if the arhive vs backup distinction makes sense really but
I have heard of some users doing things that depend on it.</p>