Overriding check_last when running borgmatic check --only archives #534
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#534
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
I am trying to run a manual consistency check of all archives in two repositories.
The config files have
check_last: 3
in the consistency sections. The manual consistency check is intended to be run on demand, and should check all archives, not just the three latest.Steps to reproduce (if a bug)
Create a config file with
check_last: 3
.Run
borgmatic check --only archives
Actual behavior (if a bug)
The check only verifies consistency of the last three arcives;
Expected behavior (if a bug)
The check should verify the integrity of all archives, disregarding the
check_last: 3
line in the config fileOther notes / implementation ideas
Add to documentation if this is intentional (or won't be fixed).
The documentation could describe how to run this using an arbitrary borg command.
Environment
borgmatic version: 1.6.0
borgmatic installation method:
sudo pip3 install --user --upgrade borgmatic
Borg version: 1.2.0
Python version: 3.8.10
Database version (if applicable): Ver 15.1 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
operating system and version: Description: Ubuntu 20.04.4 LTS
Thanks for filing the ticket! The behavior you're seeing is actually by design. borgmatic runs your requested action (e.g.
check
) with all the configured options in borgmatic's configuration file so that you don't have to re-specify them. However, in this case, if you really want to override thecheck_last
option, there is a way to do that! Try this:The
--override
flag allows you to override arbitrary configuration file options on the command-line.It does! See this how-to and let me know if it meets your needs.
Thanks! I had missed the
--override
flag, perfect.Glad to hear it might work for you! If it turns out it doesn't for whatever reason, please let me know.