borgmatic doesn't show the borg error output for local repositories #705

Closed
opened 2023-05-28 16:26:37 +00:00 by kaysond · 3 comments

What I'm trying to do and why

Steps to reproduce (if a bug)

Run some kind of borg command that fails, with --verbosity 2

Actual behavior (if a bug)

Borgmatic will show the borg error output for remote repositories (I'm guessing because it's just showing all ssh output?) but not local ones.

Expected behavior (if a bug)

Borgmatic should always show the error output.

Other notes / implementation ideas

Here are some verbose logs showing the issue: the borg error output ("--repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments") is shown after the remote repo runs, but not after the local one! I did check, and if I just do the local repository, I still don't get an error message.

Discovered while looking into #704 so could also be related to #688 but I'm guessing it's a general thing and not related to checks specifically.

ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg: Running consistency checks
borg info --json ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg                                                                                                             Reading check time from /root/.borgmatic/checks/dd22d39afc3a473af796348a2c054411368ea48a2c688b67cd7ed32dbed0e8e8/repository
Reading check time from /root/.borgmatic/checks/dd22d39afc3a473af796348a2c054411368ea48a2c688b67cd7ed32dbed0e8e8/archives/a47a4e53797d8a33427d8cd3201c607013e1a883195b3fbdebbe0454df566b7c
Skipping archives check due to configured frequency; 6 days, 10:12:03.845993 until next check
borg check --repository-only --glob-archives home-* --debug --show-rc ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg
using builtin fallback logging configuration
33 self tests completed in 0.18 seconds                                                                                                                                   SSH command line: ['ssh', '-i', '/root/.ssh/borg@343guiltyspark.nub.lan.key', 'borg@borgvm.iyer.lan', 'borg', 'serve', '--debug']
Remote: using builtin fallback logging configuration
Remote: 38 self tests completed in 0.28 seconds
Remote: using builtin fallback logging configuration
Remote: Initialized logging system for JSON-based protocol
Remote: Resolving repository path b'/mnt/arambkup/borg'
Remote: Resolved repository path to '/mnt/arambkup/borg'
--repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments.
RemoteRepository: 140 B bytes sent, 837 B bytes received, 2 messages sent                                                                                                 terminating with error status, rc 2                                                                                                                                       ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg: Error running actions for repository                                                                                        Command 'borg check --repository-only --glob-archives home-* --debug --show-rc ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg' returned non-zero exit status 2.
/mnt/extdrive/borg: Running actions for repository                                                                                                                        /etc/borgmatic.d/home.yml: No commands to run for pre-actions hook
/etc/borgmatic.d/home.yml: No commands to run for pre-check hook                                                                                                          /mnt/extdrive/borg: Running consistency checks
borg info --json /mnt/extdrive/borg                                                                                                                                       Reading check time from /root/.borgmatic/checks/758b61594cf8118b5cddea6aeadad04db905c4506aec0cc44249fbc95c922133/repository
Reading check time from /root/.borgmatic/checks/758b61594cf8118b5cddea6aeadad04db905c4506aec0cc44249fbc95c922133/archives/a47a4e53797d8a33427d8cd3201c607013e1a883195b3fbdebbe0454df566b7c
Skipping archives check due to configured frequency; 6 days, 10:14:28.939407 until next check
borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg
using builtin fallback logging configuration                                                                                                                              33 self tests completed in 0.19 seconds
--repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments.
terminating with error status, rc 2
/mnt/extdrive/borg: Error running actions for repository
Command 'borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg' returned non-zero exit status 2.

Environment

borgmatic version: 1.7.13

borgmatic installation method: pip

Borg version: 1.2.4

Python version: 3.9.2

operating system and version: Debian 11

#### What I'm trying to do and why #### Steps to reproduce (if a bug) Run some kind of borg command that fails, with `--verbosity 2` #### Actual behavior (if a bug) Borgmatic will show the `borg` error output for remote repositories (I'm guessing because it's just showing all ssh output?) but not local ones. #### Expected behavior (if a bug) Borgmatic should always show the error output. #### Other notes / implementation ideas Here are some verbose logs showing the issue: the `borg` error output ("--repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments") is shown after the remote repo runs, but not after the local one! I did check, and if I just do the local repository, I still don't get an error message. Discovered while looking into #704 so could also be related to #688 but I'm guessing it's a general thing and not related to checks specifically. ``` ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg: Running consistency checks borg info --json ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg Reading check time from /root/.borgmatic/checks/dd22d39afc3a473af796348a2c054411368ea48a2c688b67cd7ed32dbed0e8e8/repository Reading check time from /root/.borgmatic/checks/dd22d39afc3a473af796348a2c054411368ea48a2c688b67cd7ed32dbed0e8e8/archives/a47a4e53797d8a33427d8cd3201c607013e1a883195b3fbdebbe0454df566b7c Skipping archives check due to configured frequency; 6 days, 10:12:03.845993 until next check borg check --repository-only --glob-archives home-* --debug --show-rc ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg using builtin fallback logging configuration 33 self tests completed in 0.18 seconds SSH command line: ['ssh', '-i', '/root/.ssh/borg@343guiltyspark.nub.lan.key', 'borg@borgvm.iyer.lan', 'borg', 'serve', '--debug'] Remote: using builtin fallback logging configuration Remote: 38 self tests completed in 0.28 seconds Remote: using builtin fallback logging configuration Remote: Initialized logging system for JSON-based protocol Remote: Resolving repository path b'/mnt/arambkup/borg' Remote: Resolved repository path to '/mnt/arambkup/borg' --repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments. RemoteRepository: 140 B bytes sent, 837 B bytes received, 2 messages sent terminating with error status, rc 2 ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg: Error running actions for repository Command 'borg check --repository-only --glob-archives home-* --debug --show-rc ssh://borg@borgvm.iyer.lan/mnt/arambkup/borg' returned non-zero exit status 2. /mnt/extdrive/borg: Running actions for repository /etc/borgmatic.d/home.yml: No commands to run for pre-actions hook /etc/borgmatic.d/home.yml: No commands to run for pre-check hook /mnt/extdrive/borg: Running consistency checks borg info --json /mnt/extdrive/borg Reading check time from /root/.borgmatic/checks/758b61594cf8118b5cddea6aeadad04db905c4506aec0cc44249fbc95c922133/repository Reading check time from /root/.borgmatic/checks/758b61594cf8118b5cddea6aeadad04db905c4506aec0cc44249fbc95c922133/archives/a47a4e53797d8a33427d8cd3201c607013e1a883195b3fbdebbe0454df566b7c Skipping archives check due to configured frequency; 6 days, 10:14:28.939407 until next check borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg using builtin fallback logging configuration 33 self tests completed in 0.19 seconds --repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments. terminating with error status, rc 2 /mnt/extdrive/borg: Error running actions for repository Command 'borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg' returned non-zero exit status 2. ``` #### Environment **borgmatic version:** 1.7.13 **borgmatic installation method:** pip **Borg version:** 1.2.4 **Python version:** 3.9.2 **operating system and version:** Debian 11
Owner

Thanks for filing this one as well. Based on your included borgmatic output though, it does look like the Borg error is showing up for the local repository (unless I'm missing something). Here's the portion of the log where it shows up:

borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg
using builtin fallback logging configuration
33 self tests completed in 0.19 seconds
--repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments.
terminating with error status, rc 2
Thanks for filing this one as well. Based on your included borgmatic output though, it does look like the Borg error is showing up for the local repository (unless I'm missing something). Here's the portion of the log where it shows up: ``` borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg using builtin fallback logging configuration 33 self tests completed in 0.19 seconds --repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data arguments. terminating with error status, rc 2 ```
Author

Thanks for filing this one as well. Based on your included borgmatic output though, it does look like the Borg error is showing up for the local repository (unless I'm missing something). Here's the portion of the log where it shows up:

borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg
using builtin fallback logging configuration
33 self tests completed in 0.19 seconds
--repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data argument
terminating with error status, rc 2

..................I am blind. Thanks. Closing this

> Thanks for filing this one as well. Based on your included borgmatic output though, it does look like the Borg error is showing up for the local repository (unless I'm missing something). Here's the portion of the log where it shows up: > > ``` > borg check --repository-only --glob-archives home-* --debug --show-rc /mnt/extdrive/borg > using builtin fallback logging configuration > 33 self tests completed in 0.19 seconds > --repository-only contradicts --first, --last, --glob-archives, --prefix and --verify-data argument > terminating with error status, rc 2 > ``` ..................I am blind. Thanks. Closing this
Owner

No worries! Verbose output can be very ... verbose. 😄

No worries! Verbose output can be very ... verbose. 😄
witten added the
question / support
label 2023-05-31 03:25:43 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#705
No description provided.