Order of default actions? #873
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#873
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
My reading of the docs is that in the absence of any verbs, borgmatic will: prune, compact, create and check. However, based on the hooks that execute, the actual order is: create, compact, prune, check.
Steps to reproduce
Run
sudo borgmatic -c config.yaml
with simpleecho
s on the after_ hooks.Actual behavior
No response
Expected behavior
No response
Other notes / implementation ideas
No response
borgmatic version
1.8.11
borgmatic installation method
pipx
Borg version
1.2.8
Python version
3.11.2
Database version (if applicable)
No response
Operating system and version
Debian GNU/Linux 12 (bookworm)
setting verbosity to 1 seems to confirm the behavior.
In the CLI reference I see this:
Which is closer to what I see when running it, so perhaps this is a documentation issue (even though I think prune, compact, create, check is the most appropriate order, so maybe the solution here is to always be explicit).
Thanks for taking the time to file this! The default ordering is indeed
create
,prune
,compact
,check
, but where in the docs are you seeing that the actual order is otherwise? There were a few cases where the actions happened to be listed in the non-default order in the docs (see the linked changeset), but I didn't find anywhere that outright said the default order is other thancreate
,prune
,compact
,check
. Of particular interest is the start of these docs.That actually used to be the default order in older versions of borgmatic. See #304 for the details on why it was changed. But yeah, you can specify any order you like on the command-line.
I may have missed the "prior version" label in the below:
That said, I still believe that the default I'm seeing is create, compact, prune, check but I'll see if I can confirm that.
Hmm, yeah, let me know if you're somehow seeing that still.. ideally with logs! Here's the relevant code from
main
that applies the default ordering:Confirm the default is: create, prune, compact, check.