check config file name #77

Closed
opened 2018-07-17 15:53:55 +00:00 by erachen · 4 comments

Using borgmatic, I notice that every file in /etc/borgmatic.d/ are read, even those ending with a tilda "~" that are usually a backup copy made by emacs or this kind of text editor.

In my case, I set up a backup using /etc/borgmatic.d/mybackup.yaml
then adjust some parameters and a few days after, I realize that borgmatic run my config twice, the old version (ending with "~") and the current version.

I think that borgmatic should only consider a subset of config file like the debian "run-parts" does. Or at least ignore file ending with a tilda "~"

Using borgmatic, I notice that *every* file in /etc/borgmatic.d/ are read, even those ending with a tilda "~" that are usually a backup copy made by emacs or this kind of text editor. In my case, I set up a backup using /etc/borgmatic.d/mybackup.yaml then adjust some parameters and a few days after, I realize that borgmatic run my config twice, the old version (ending with "~") and the current version. I think that borgmatic should only consider a subset of config file like the debian "run-parts" does. Or at least ignore file ending with a tilda "~"
Owner

Might make sense to look at only *.yaml-named files, as that'll protect against ignoring files like *~, *.swp, etc.

Might make sense to look at only `*.yaml`-named files, as that'll protect against ignoring files like `*~`, `*.swp`, etc.
Owner

Just fixed this in master. This fix will go out in the next release. Thanks for reporting it!

Just fixed this in master. This fix will go out in the next release. Thanks for reporting it!
Author

Great !

Looking for .yaml file is simple and robust,
but I was not sure if there is some habit to use other files extension like
.conf, .ini or so.

Thanks to have consider this PR and for writing tests along :)

Great ! Looking for .yaml file is simple and robust, but I was not sure if there is some habit to use other files extension like .conf, .ini or so. Thanks to have consider this PR and for writing tests along :)
Owner

Released in borgmatic 1.2.1!

Released in borgmatic 1.2.1!
witten referenced this issue from a commit 2023-08-06 00:20:28 +00:00
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#77
No description provided.