I'm trying to figure out how to automatically sync all the remotes that I can currently reach while the local repo does not want any content.
Specifically want to download content from a server (remote repo) to a USB-drive (directory special remote) through a local repo.
If the local repo has no preferred content set or if the preferred content includes the files I want to sync to the disk it works.
However, if I set the local preferred content to exclude=*
neither sync
, satisfy
nor assist
do what I had hoped, which is to download the files, copy them to the remote and then delete the local copy.
Is there something I can do to achieve this behavior?
What you want is the behavior of a transfer repository. See standard groups.
Using the standard transfer group wouldn't work in this situation because the remotes cannot be clients (among other reason because the server repo is bigger than the external drives).
But from your answer I surmise that the local repo must want the files unless they are on the drives and no longer want them once they are on drives, is that correct?
I will try letting it run overnight with the local repo's wanted being
"not copies=2"
. Hopefully sync will drop the local copy as soon as it has been transferred to the drive and not keep that for last.not copies=2
might be sufficient in your situation.If you look at the preferred content expression for a transfer repository, it is:
not (inallgroup=client and copies=client:2) and ($client)
Where
$client
is a copy of the preferred content expressions of the client.There's no reason you can't write a preferred content expression that does the same thing for some other group of repositories.