I think I might have a wrong mental model about what the annex assistant is really doing and I want to clarify some things.
I have a simple setup, everything was set up with the web app.
Desktop
: repository mode, paired locally with Laptop, paired with web server remoteServer
Laptop
: manual mode, paired locally with Desktop, paired with web server remoteServer
Server
: transfer client
The intention is that Desktop
always holds all the files, Laptop
has some files on-demand, and Server
is only used for transfer.
After the initial setup configuration, I restarted and used the git annex assistant
on both Desktop
and Laptop
(instead of git annex webapp
).
Here are the things that I assumed would happen in this setup.
- There won't be any traffic to the
Server
as long asDesktop
andLaptop
are reachable, i.e. in the same network.- I first started pairing
Desktop
andLaptop
locally. With both in sync, I added theServer
remote toLaptop
first, and then I already saw files transferred toServer
, which I did not expect.
- I first started pairing
- After adding files to
Desktop
, eventually, all metadata would appear onLaptop
, but never the content as long as I don't manually add it viagit annex add
- After adding files to
Laptop
, content would be synced toDesktop
. The added content onLaptop
would never be replaced with symlinks, because there is nothing to sync. The latest version is already there. - After dropping files from
Laptop
, the content would stay gone until I re-add it.
All my assumptions are immediately violated, so I assume I got them wrong. Is my assistant setup correct for the things that I intend to do?
Small example for
I added a
script.sh
file and some resources toLaptop
. After it synced toDesktop
, I executedscript.sh
. The content ofscript.sh
did not change, but right now thescript.sh
file became a symlink. I assume this symlink will not be replaced, becauseLaptop
is in manual mode. Is some metadata change of the file causing syncing again? Access time metadata or some other internal file system metadata that I don't know about?Ok, so I think I understand now where all of my problems come from.
On adding new content in
Desktop
, if some files are duplicates of already available content onLaptop
, those will not be symlinks onLaptop
. When I dropped files fromLaptop
, the duplicate files in other folders, which I did not intend to drop, got also removed. I re-added them, and observed that the files I dropped came back again. Obviously, because they are the same duplicate files.Very confusing behavior, at least until I understood how duplicate files are handled and the interaction with git annex drop/get + manual mode. Is there maybe some command that drops files from a folder, that only exist in that folder?