Log output doesn't contain config filename anymore #1051

Closed
opened 2025-04-02 15:13:13 +00:00 by arjan-s · 5 comments

What I'm trying to do and why

On my setup, borgmatic runs 6 different configuration files. In the past, the borgmatic output would contain 6 lines like this one:

INFO Successfully ran configuration file /etc/borgmatic.d/docs.yml

This helped my inform my monitoring system that a certain backup job was successful.
A recent version of borgmatic has changed this output to 6 times this line:

INFO Successfully ran configuration file

I couldn't find why this change was made, but it has made monitoring my backups more difficult.

This is why I'm requesting to re-add the configuration filename to borgmatic's output.

Steps to reproduce

Run borgmatic with multiple configuration files.

Actual behavior

Backup job filename is not included in the output anymore.

Expected behavior

Backup job filename should still be included in the output.

Other notes / implementation ideas

No response

borgmatic version

1.9.14

borgmatic installation method

NixOS module

Borg version

1.4.0

Python version

3.12.9

Database version (if applicable)

No response

Operating system and version

NixOS 25.05 (Warbler) (unstable)

### What I'm trying to do and why On my setup, borgmatic runs 6 different configuration files. In the past, the borgmatic output would contain 6 lines like this one: ``` INFO Successfully ran configuration file /etc/borgmatic.d/docs.yml ``` This helped my inform my monitoring system that a certain backup job was successful. A recent version of borgmatic has changed this output to 6 times this line: ``` INFO Successfully ran configuration file ``` I couldn't find why this change was made, but it has made monitoring my backups more difficult. This is why I'm requesting to re-add the configuration filename to borgmatic's output. ### Steps to reproduce Run borgmatic with multiple configuration files. ### Actual behavior Backup job filename is not included in the output anymore. ### Expected behavior Backup job filename should still be included in the output. ### Other notes / implementation ideas _No response_ ### borgmatic version 1.9.14 ### borgmatic installation method NixOS module ### Borg version 1.4.0 ### Python version 3.12.9 ### Database version (if applicable) _No response_ ### Operating system and version NixOS 25.05 (Warbler) (unstable)
Owner

Thanks for filing this! I generally don't recommend parsing borgmatic's log output (except for --json output), but I agree that this is a regression that should be fixed even just for uses cases like reading logs.

So I've fixed it in main, and it'll be part of the next release! Note however that the filename is now at the start of the log message instead of the end, which is more consistent with other log messages.

Also: If there's anything borgmatic can do to make your monitoring use cases easier or more officially supported, please let me know! (Ideally on a separate ticket.) Maybe something like #617 would be useful.

Thanks for filing this! I generally don't recommend parsing borgmatic's log output (except for `--json` output), but I agree that this is a regression that should be fixed even just for uses cases like reading logs. So I've fixed it in main, and it'll be part of the next release! Note however that the filename is now at the start of the log message instead of the end, which is more consistent with other log messages. Also: If there's anything borgmatic can do to make your monitoring use cases easier or more officially supported, please let me know! (Ideally on a separate ticket.) Maybe something like #617 would be useful.
Author

Thank you for the quick answer and resolution! I'm already using borgmatic rinfo --json for getting repository info for my monitoring.
What I wanted to accomplish here (and had accomplished before it changed) was a simple verification that the last backup run was successful for each config file (taken from journalctl).
The JSON output from #617 would indeed be very helpful as well. Possibly configured the same way as the third party monitoring integrations or like the hooks.
But I'm already happy with what I have now, so please don't sink any time into it for my sake. :)

Thank you for the quick answer and resolution! I'm already using `borgmatic rinfo --json` for getting repository info for my monitoring. What I wanted to accomplish here (and had accomplished before it changed) was a simple verification that the last backup run was successful for each config file (taken from journalctl). The JSON output from https://projects.torsion.org/borgmatic-collective/borgmatic/issues/617 would indeed be very helpful as well. Possibly configured the same way as the third party monitoring integrations or like the hooks. But I'm already happy with what I have now, so please don't sink any time into it for my sake. :)
Owner

Sounds good! Thanks for the additional context.

Sounds good! Thanks for the additional context.
Owner

Released in borgmatic 2.0.0!

Released in borgmatic 2.0.0!
Author

Awesome, thank you!

Awesome, thank you!
Sign in to join this conversation.
No milestone
No assignees
2 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#1051
No description provided.