Borgmatic 1.7.11 generates an illegal Borg command #679
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#679
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
orsudo 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
ormysql --version
on client and server.operating system and version: [Linux - Fedora 37]
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.
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-namingThe TL;DR is you can probably just get rid of your
prefix
.