Hello, # borgmatic -c /etc/borgmatic.d/complete_system.yaml borg upgrade --show-rc --check-archives-tam [...] Archive TAM missing: batou_2022-10-19T16:28+02:00 Wed, 2022-10-19 18:30:22 [<<hash>>] Archive TAM present: batou_2023-02-16T16:20+0100 Thu, 2023-02-16 16:21:08 [<<hash>>] [...] Found 20 archives with TAM issues! terminating with warning status, rc 1 # echo $? 0 It seems as though `borgmatic borg ...` calls don't correctly pass the return code of borg to the shell. Would be sensible to have for scripting purposes. Greetings, Lee
This is actually intentional. borgmatic is a wrapper for many executables besides just Borg; it calls out to database clients, filesystem snapshot software, and even arbitrary commands (in the form of before_* and after_* hooks). So IMO it doesn't make sense to adopt the return codes for only one of those executables. But what borgmatic does offer is the ability to configure how different Borg exit codes are interpreted as either warnings or errors. See https://torsion.org/borgmatic/docs/how-to/customize-warnings-and-errors/ for more information. Dan
(Not sure why I didn't get the reply, just saw it by chance on the web frontend.) Now that you pointed me to those docs it kinda makes sense to not pass those through. Those config settings should be enough to get it to work for my use case. Thanks! Greetings, Lee