Before everything hook running twice with include directive #1124
Labels
No labels
blocked
breaking
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#1124
Loading…
Reference in a new issue
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
I'm trying to have separate repository config for an application-backup. To take backup I need to generate the backup first, so I implemented a before-hook for everything.
The issue is that the before-hook for everything runs twice, for each config-file as defined in
.config/borgmatic.d/Steps to reproduce
Use config files below, replace the variables as necessary
Common config file not used by borgmatic directly, only included
$ cat .config/borgmatic/gitea-common.yaml
borgmatic.d config files:
cat .config/borgmatic.d/gitea-local.yaml
cat .config/borgmatic.d/gitea-remote.yaml
Actual behavior
See that
prepare_is created twice, one for each config file.backup@server:~$ borgmatic
Running before create everything command hook
PGDATA=*** bash -c 'touch /tmp/borg-repro/prepare_$(date +%Y%m%d%H%M%S%N)'
Running before create everything command hook
PGDATA=*** bash -c 'touch /tmp/borg-repro/prepare_$(date +%Y%m%d%H%M%S%N)'
Expected behavior
Only one prepare file should be created as we use
everythingfor the hook. As stated in the docs:Other notes / implementation ideas
No response
borgmatic version
2.0.3
borgmatic installation method
pip
Borg version
borg 1.4.1
Python version
Python 3.12.11
Database version (if applicable)
No response
Operating system and version
N/A
Before everything hook running twiceto Before everything hook running twice with include directiveLooks like I've hit this issue: #1080 (comment) and should be solved in 2.0.4
Yup, good sleuthing! If upgrading to 2.0.4+ doesn't do it for you, please let me know.
2.0.4+ solved it, thanks!
Glad to hear it!