Hello,
I have an repo that uses standard groups / wanted expressions:
% git annex wanted . && git annex group .
standard
archive backup
I use the two groups so that the repo wants anything (backup) and is recognized as an archive repo, so other repos drop files in archive/.
% git annex drop fortune
drop fortune (checking S3...) ok
(recording state in git...)
fine. But:
% git annex get --auto
does nothing. I do not understand, why the repo does not want the file. Same for git annex sync --content.
% git annex whereis fortune
whereis fortune (3 copies)
19317658-7d40-4412-94ba-a2525e625283 -- Asaru
2f41eb74-5f33-4737-bb6b-1cd31dd67ee5 -- External
728648bf-5276-4a86-9df9-9a30f4783027 -- [S3]
ok
Asaru is standard/client, S3 is standard/backup and External has no group / wanted set.
Thanks, Florian
The problem is that you have the repository in two groups.
The way that
standard
works is that the repository has to be in exactly one group and then it will use the preferred content for that group. It does not know what to do when there are two groups being combined.Solution for you is to run:
Since backup repositories have a copy of every file, matching anything is what you want it to do. Since it's also in the archive group, other archive repositories will treat it as an archive too, so once a file reaches your combo backup and archive repository, it will be removed from other archives.
Of course, you could also OR the preferred content expression for backup with the preferred content expression for archive, but that would have the same result since "anything OR archive" matches anything.
But we can't just OR the two preferred content expressions for two groups in general. Consider the client and archive preferred content expressions:
These are contradictory when a repository is in both the client and archive groups; the client doesn't want anything that's in an archive, but if the repository is both a client and an archive, it doesn't want any content that it has!