Borgmatic runs any underlying borg command twice #386

Closed
opened 2021-01-26 08:32:49 +00:00 by coaxial · 2 comments

What I'm trying to do and why

When I run any borgmatic commands that calls borg, it runs them twice.

Steps to reproduce (if a bug)

location:
    source_directories:
        - ~/somedit
    repositories:
        - host:repo
    one_file_system: true
storage:
    encryption_passcommand: cat /passphrase
retention:
    keep_daily: 7
    keep_weekly: 4
    keep_monthly: 6
    keep_yearly: 1
consistency:
    checks:
        - repository
        - archives
    check_last: 3

Run borgmatic list for example, and see that it runs the underlying borg command twice, showing the output twice. Same goes when making a backup: it makes the backup twice. But running borgmatic --version for instance only shows the output once. Same for borg --version: runs only once.

Actual behavior (if a bug)

$ borgmatic list --verbosity 2
Ensuring legacy configuration is upgraded
host:repo: Listing archives
borg list --debug --show-rc host:repo
using builtin fallback logging configuration
35 self tests completed in 0.11 seconds
SSH command line: ['ssh', 'host', 'borg', 'serve', '--umask=077', '--debug']
Remote: using builtin fallback logging configuration
Remote: using builtin fallback logging configuration
Remote: Initialized logging system for JSON-based protocol
Remote: Resolving repository path b'repo'
Remote: Resolved repository path to '/data1/home/user/repo'
Remote: Verified integrity of /data1/home/user/repo/index.1645
TAM-verified manifest
security: read previous location 'ssh://host/./repo'
security: read manifest timestamp '2021-01-26T08:14:38.103280'
security: determined newest manifest timestamp as 2021-01-26T08:14:38.103280
security: repository checks ok, allowing access
<backups list>
RemoteRepository: 213 B bytes sent, 3.44 kB bytes received, 5 messages sent
terminating with success status, rc 0
host:repo: Listing archives
borg list --debug --show-rc host:repo
using builtin fallback logging configuration
35 self tests completed in 0.10 seconds
SSH command line: ['ssh', 'host', 'borg', 'serve', '--umask=077', '--debug']
Remote: using builtin fallback logging configuration
Remote: using builtin fallback logging configuration
Remote: Initialized logging system for JSON-based protocol
Remote: Resolving repository path b'repo'
Remote: Resolved repository path to '/data1/home/user/repo'
Remote: Verified integrity of /data1/home/host/repo/index.1645
TAM-verified manifest
security: read previous location 'ssh://host/./repo'
security: read manifest timestamp '2021-01-26T08:14:38.103280'
security: determined newest manifest timestamp as 2021-01-26T08:14:38.103280
security: repository checks ok, allowing access
<same backups list>
RemoteRepository: 213 B bytes sent, 3.45 kB bytes received, 5 messages sent
terminating with success status, rc 0

summary:
/etc/borgmatic.d/config.yaml: Successfully ran configuration file
/home/me/.config/borgmatic/config.yaml: Successfully ran configuration file

Expected behavior (if a bug)

Run only once.

Other notes / implementation ideas

Environment

borgmatic version: 1.5.1

Use sudo borgmatic --version or sudo pip show borgmatic | grep ^Version

borgmatic installation method: I think I used pip

Borg version: 1.1.15

Use sudo borg --version

Python version: Python 3.8.5

Use python3 --version

Database version (if applicable): [version here]

Use psql --version or mysql --version on client and server.

operating system and version: Ubuntu 20.04.1

#### What I'm trying to do and why When I run any borgmatic commands that calls borg, it runs them twice. #### Steps to reproduce (if a bug) ```yaml location: source_directories: - ~/somedit repositories: - host:repo one_file_system: true storage: encryption_passcommand: cat /passphrase retention: keep_daily: 7 keep_weekly: 4 keep_monthly: 6 keep_yearly: 1 consistency: checks: - repository - archives check_last: 3 ``` Run `borgmatic list` for example, and see that it runs the underlying borg command twice, showing the output twice. Same goes when making a backup: it makes the backup twice. But running `borgmatic --version` for instance only shows the output once. Same for `borg --version`: runs only once. #### Actual behavior (if a bug) ``` $ borgmatic list --verbosity 2 Ensuring legacy configuration is upgraded host:repo: Listing archives borg list --debug --show-rc host:repo using builtin fallback logging configuration 35 self tests completed in 0.11 seconds SSH command line: ['ssh', 'host', 'borg', 'serve', '--umask=077', '--debug'] Remote: using builtin fallback logging configuration Remote: using builtin fallback logging configuration Remote: Initialized logging system for JSON-based protocol Remote: Resolving repository path b'repo' Remote: Resolved repository path to '/data1/home/user/repo' Remote: Verified integrity of /data1/home/user/repo/index.1645 TAM-verified manifest security: read previous location 'ssh://host/./repo' security: read manifest timestamp '2021-01-26T08:14:38.103280' security: determined newest manifest timestamp as 2021-01-26T08:14:38.103280 security: repository checks ok, allowing access <backups list> RemoteRepository: 213 B bytes sent, 3.44 kB bytes received, 5 messages sent terminating with success status, rc 0 host:repo: Listing archives borg list --debug --show-rc host:repo using builtin fallback logging configuration 35 self tests completed in 0.10 seconds SSH command line: ['ssh', 'host', 'borg', 'serve', '--umask=077', '--debug'] Remote: using builtin fallback logging configuration Remote: using builtin fallback logging configuration Remote: Initialized logging system for JSON-based protocol Remote: Resolving repository path b'repo' Remote: Resolved repository path to '/data1/home/user/repo' Remote: Verified integrity of /data1/home/host/repo/index.1645 TAM-verified manifest security: read previous location 'ssh://host/./repo' security: read manifest timestamp '2021-01-26T08:14:38.103280' security: determined newest manifest timestamp as 2021-01-26T08:14:38.103280 security: repository checks ok, allowing access <same backups list> RemoteRepository: 213 B bytes sent, 3.45 kB bytes received, 5 messages sent terminating with success status, rc 0 summary: /etc/borgmatic.d/config.yaml: Successfully ran configuration file /home/me/.config/borgmatic/config.yaml: Successfully ran configuration file ``` #### Expected behavior (if a bug) Run only once. #### Other notes / implementation ideas #### Environment **borgmatic version:** 1.5.1 Use `sudo borgmatic --version` or `sudo pip show borgmatic | grep ^Version` **borgmatic installation method:** I think I used pip **Borg version:** 1.1.15 Use `sudo borg --version` **Python version:** Python 3.8.5 Use `python3 --version` **Database version (if applicable):** [version here] Use `psql --version` or `mysql --version` on client and server. **operating system and version:** Ubuntu 20.04.1
Author

Oh nevermind, I'm an idiot. I had the same config file in my home and in /etc/borgmatic.d and that's why it was running it twice: once for each config file!

Oh nevermind, I'm an idiot. I had the same config file in my home and in `/etc/borgmatic.d` and that's why it was running it twice: once for each config file!
Owner

Glad to hear you figured it out! Was just about to suggest something like that.

Glad to hear you figured it out! Was just about to suggest something like that.
witten added the
question / support
label 2021-01-26 18:35:55 +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#386
No description provided.