This is a fantastic improvement and one I'm eager to put to use. But are there specific requirements not outlined in the manpages or tips thread?
I'm having mixed success so far, but after my tribulations on an Apple Silicon machine I'm inclined to suspect the macOS environment (though on an Intel machine this time).
Early tests on an experimental repo worked fine: I backed up my git annex repo using the Vorta GUI and initiated the special remote, pointing to the borg repo, which was not encrypted. Everything worked as expected, including syncing and manually dropping unused files.
Doing the same thing on my real repo, with an existing encrypted borg repo, I get stuck being repeatedly asked for my passphrase. Looking at the debug info, after accepting my passphrase git annex seems to go through every existing archive one at a time, outputting stuff like this but not doing much:
[2021-05-18 13:33:36.703495] (Utility.Process) process [50690] read: borg ["list","--format","{size}{NUL}{path}{NUL}{extra}{NUL}",
I created a new archive with borg directly from the command line, too, but no change. borg seems to be doing its thing, locking the repo with each requested iteration.
Also, the syntax in the example on the tips page may not be entirely correct, AFAICT.
git-annex lets borg do whatever passphrase prompting it needs, and git-annex necessarily needs to run borg more than once, to scan all archives that it has not scanned before for annexed content. Also, getting files from a borg repository involves running borg once per file. So using it with a repo with a passphrase will probably be inconvenient, unless you use
BORG_PASSPHRASE
orBORG_PASSCOMMAND
.If there was a good way for git-annex to know if borg would need a passphrase, it could prompt for it a single time and provide it to borg, but I don't know if there's a good way to ask borg if a repository needs a passphrase. The only half-decent way I can find is to try to do something like
BORG_PASSPHRASE=wrong borg info
and see if it fails due to the wrong passphrase, or works due to not needing a passphrase.Please be more specific.
Well, that certainly explains it. Not only that, it makes perfect sense. The borg repo in question has about a hundred archives so I soon grew tired.
BORG_PASSPHRASE
seems obvious in retrospect, of course the GUI does that for me in my day-to-day use.Trying to use some of the really clever combinations on offer is challenging to a novice user. I sometimes feel like my ambition is to be a half-decent conductor, only I'm periodically also expected to step down and tune the harpsichord. Mind you, this isn't criticism – it's one of the principles that makes git-annex so great. borg is a solo performer, adding it to the ensemble is my choice and making it blend well with the rest of the instruments is up to me.
On third, careful look, I don't believe there's any error on the tips page.
Thanks!