Hello, I started using the "wanted" feature of git-annex.
I have (besides others) one local repository ("neon"), and two special remotes "ldk" (rsync) and "storage" (directory).
"wanted" and "group" are configured as (replaced UUIDs with names):
group "storage" = backup
wanted "storage" = standard
wanted "neon" = (exclude=pictures/* and exclude=video/*) or present
Now, let's assume there is a file named "video/foo.mp4". It is only present in "ldk". I want it to be present in "storage", too.
When I run "git annex sync --content" on "neon" the file "video/foo.mp4" is neither fetched to be placed in "neon" nor in "storage".
Which command do I have to run to transfer the file "video/foo.mp4" from "ldk" to "storage" when run from "neon".
Previously, I started with "git annex get `git annex find --not --in storage`" and then continued with "git annex copy `git annex find --not --in storage` --to storage". I was hoping that the wanted feature would simplify this.
What's going on here is that git-annex does not know that you want to use "neon" as a repository that transfers content between "ldk" and "storage". The configuration for "neon" only makes it want a specific set of files, so it doesn't get other files from "ldk", and so does not have them to send to "storage".
The solution is to change "neon"'s preferred content settings so it wants files that are not yet present in "storage".
The transfer repository expression is one way to configure preferred content settings so that a repo will want to download files that other repos want to have.
But that expression only works for transfer repsitories in between client repositories. Your "storage" repo is set to be a backup repository.
So, we need something a little bit different.
I think that would work, but I don't see a way to reconcile it with the configuration you already have for "neon". If neon wants to "exclude=pictures/ and exclude=video/" then it will never get those and so can never send them on to "storage". And if neon wants all "present" files, then anything it does get for whatever reason will stay in it, which is just not how a transfer repo needs to work.
What might work better is to set up a separate repository that can talk to "ldk" and "storage" (as well as perhaps pulling files from "neon" when available), and make it have that preferred content expression.
present or (not inallgroup=backup) or (exclude=pictures/* and exclude=video/*)
, which seems to be doing what I want. The most important thing to me is that files are transferred to the backup group. Some files might be left in pictures/ or video/ on "neon", but I can drop those from time to time if disk space is low.