Borgmatic 1.7.11 generates an illegal Borg command #679

Closed
opened 2023-04-17 13:26:01 +00:00 by pocal · 3 comments

What I'm trying to do and why

Running my regular nightly backup

Steps to reproduce (if a bug)

Include (sanitized) borgmatic configuration files if applicable.

$ grep "^[ ]*[A-Za-z/-]" /etc/borgmatic/config.yaml

location:
source_directories:
- /home
- /etc
- /storage/Media/Books
- /var/log
- /var/www
- /boot
- /root
- /usr/local
- /opt
repositories:
- /raid/Backups/Borg
patterns_from:
- /etc/borgmatic/patterns
exclude_if_present:
- .nobackup
keep_exclude_tags: true
storage:
archive_name_format: "{hostname}-{now:%Y-%m-%d_%H:%M}"
relocated_repo_access_is_ok: true
unknown_unencrypted_repo_access_is_ok: true
retention:
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
keep_yearly: 5
prefix: "{hostname}-"
hooks:
before_backup:
- echo "Starting a backup."
before_prune:
- echo "Starting pruning."
before_check:
- echo "Starting checks."
after_backup:
- echo "Finished a backup."
after_prune:
- echo "Finished pruning."
after_check:
- echo "Finished checks."
on_error:
- echo "Error during prune/create/check."
before_everything:
- echo "Starting actions."
after_everything:
- echo "Completed actions."

Actual behavior (if a bug)

Starting a backup
Starting pruning
/raid/Backups/Borg: Error running actions for repository
Command 'borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --keep-yearly 5 --glob-archives {hostname}-* --glob-archives {hostname}-* /raid/Backups/Borg' returned non-zero exit status 2.
Error during prune/create/check.
/etc/borgmatic/config.yaml: An error occurred
Completed actions.

summary:
/etc/borgmatic/config.yaml: An error occurred
/raid/Backups/Borg: Error running actions for repository
usage: borg prune [-h] [--critical] [--error] [--warning] [--info] [--debug]
[--debug-topic TOPIC] [-p] [--iec] [--log-json]
[--lock-wait SECONDS] [--bypass-lock] [--show-version]
[--show-rc] [--umask M] [--remote-path PATH]
[--remote-ratelimit RATE] [--upload-ratelimit RATE]
[--remote-buffer UPLOAD_BUFFER]
[--upload-buffer UPLOAD_BUFFER] [--consider-part-files]
[--debug-profile FILE] [--rsh RSH] [-n] [--force] [-s]
[--list] [--keep-within INTERVAL] [--keep-last SECONDLY]
[--keep-minutely MINUTELY] [-H HOURLY] [-d DAILY]
[-w WEEKLY] [-m MONTHLY] [-y YEARLY] [-P PREFIX | -a GLOB]
[--save-space] [-c SECONDS]
[REPOSITORY]
borg prune: error: argument -a/--glob-archives: There can be only one.
Command 'borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --keep-yearly 5 --glob-archives {hostname}-* --glob-archives {hostname}-* /raid/Backups/Borg' returned non-zero exit status 2.

Expected behavior (if a bug)

Borgmatic is generating two --glob-archives options, which is giving the error. This shouldn't happen.

Other notes / implementation ideas

Config files are unchanged in several months, but the problem started a few days ago after updating borgmatic.

Environment

borgmatic version: [1.7.11]

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

borgmatic installation method: [Fedora 37 RPM]

Borg version: [1.2.4]

Use sudo borg --version

Python version: [3.11.2]

Use python3 --version

Database version (if applicable): [N/A]

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

operating system and version: [Linux - Fedora 37]

#### What I'm trying to do and why Running my regular nightly backup #### Steps to reproduce (if a bug) Include (sanitized) borgmatic configuration files if applicable. $ grep "^[ ]*[A-Za-z/-]" /etc/borgmatic/config.yaml location: source_directories: - /home - /etc - /storage/Media/Books - /var/log - /var/www - /boot - /root - /usr/local - /opt repositories: - /raid/Backups/Borg patterns_from: - /etc/borgmatic/patterns exclude_if_present: - .nobackup keep_exclude_tags: true storage: archive_name_format: "{hostname}-{now:%Y-%m-%d_%H:%M}" relocated_repo_access_is_ok: true unknown_unencrypted_repo_access_is_ok: true retention: keep_daily: 7 keep_weekly: 4 keep_monthly: 6 keep_yearly: 5 prefix: "{hostname}-" hooks: before_backup: - echo "Starting a backup." before_prune: - echo "Starting pruning." before_check: - echo "Starting checks." after_backup: - echo "Finished a backup." after_prune: - echo "Finished pruning." after_check: - echo "Finished checks." on_error: - echo "Error during prune/create/check." before_everything: - echo "Starting actions." after_everything: - echo "Completed actions." #### Actual behavior (if a bug) Starting a backup Starting pruning /raid/Backups/Borg: Error running actions for repository Command 'borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --keep-yearly 5 --glob-archives {hostname}-* --glob-archives {hostname}-* /raid/Backups/Borg' returned non-zero exit status 2. Error during prune/create/check. /etc/borgmatic/config.yaml: An error occurred Completed actions. summary: /etc/borgmatic/config.yaml: An error occurred /raid/Backups/Borg: Error running actions for repository usage: borg prune [-h] [--critical] [--error] [--warning] [--info] [--debug] [--debug-topic TOPIC] [-p] [--iec] [--log-json] [--lock-wait SECONDS] [--bypass-lock] [--show-version] [--show-rc] [--umask M] [--remote-path PATH] [--remote-ratelimit RATE] [--upload-ratelimit RATE] [--remote-buffer UPLOAD_BUFFER] [--upload-buffer UPLOAD_BUFFER] [--consider-part-files] [--debug-profile FILE] [--rsh RSH] [-n] [--force] [-s] [--list] [--keep-within INTERVAL] [--keep-last SECONDLY] [--keep-minutely MINUTELY] [-H HOURLY] [-d DAILY] [-w WEEKLY] [-m MONTHLY] [-y YEARLY] [-P PREFIX | -a GLOB] [--save-space] [-c SECONDS] [REPOSITORY] borg prune: error: argument -a/--glob-archives: There can be only one. Command 'borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --keep-yearly 5 --glob-archives {hostname}-* --glob-archives {hostname}-* /raid/Backups/Borg' returned non-zero exit status 2. #### Expected behavior (if a bug) Borgmatic is generating two --glob-archives options, which is giving the error. This shouldn't happen. #### Other notes / implementation ideas Config files are unchanged in several months, but the problem started a few days ago after updating borgmatic. #### Environment **borgmatic version:** [1.7.11] Use `sudo borgmatic --version` or `sudo pip show borgmatic | grep ^Version` **borgmatic installation method:** [Fedora 37 RPM] **Borg version:** [1.2.4] Use `sudo borg --version` **Python version:** [3.11.2] Use `python3 --version` **Database version (if applicable):** [N/A] Use `psql --version` or `mysql --version` on client and server. **operating system and version:** [Linux - Fedora 37]
Collaborator

Hi, I think this was fixed in 1.7.12 - #670. Can you test it out and let us know?

Hi, I think this was fixed in `1.7.12` - https://projects.torsion.org/borgmatic-collective/borgmatic/issues/670. Can you test it out and let us know?
Author

Hi, I think this was fixed in 1.7.12 - #670. Can you test it out and let us know?

I tried it from the Fedora updates repo and it works now.

Thanks.

> Hi, I think this was fixed in `1.7.12` - https://projects.torsion.org/borgmatic-collective/borgmatic/issues/670. Can you test it out and let us know? I tried it from the Fedora updates repo and it works now. Thanks.
pocal closed this issue 2023-04-17 16:18:59 +00:00
Owner

Glad to hear that did it! 1.7.11 was kind of a stinker.. at least for users of the prefix option. Given that you're one of them, you may be interested in the new feature described here: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/#archive-naming

The TL;DR is you can probably just get rid of your prefix.

Glad to hear that did it! 1.7.11 was kind of a stinker.. at least for users of the `prefix` option. Given that you're one of them, you may be interested in the new feature described here: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/#archive-naming The TL;DR is you can probably just get rid of your `prefix`.
Sign in to join this conversation.
No Milestone
No Assignees
3 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#679
No description provided.