What about having a ~/.config/borgmatic.d/ config dir #274

Closed
opened 2019-12-28 13:04:46 +00:00 by codingforfun · 5 comments

What I'm trying to do and why

I try to use the per app config approach running borgmatic from my user account.
I would like to use the approach of having different borgmatic configs for different sources within my home dir (e.g. work, private, music collection, pictures), to have different settings (e.g. retention).

I don’t need to backup something from the system but only from within my users home, so I would like to keep everything local to the user account and not mess around with /etc.

My scenario is to manually trigger pre-configured backups onto USB disks by just calling borgmatic.

Actual behavior

I just tried creating ~/.config/borgmatic.d/ but it’s not recognized.
Borgmatic complains with:

/etc/borgmatic/config.yaml /etc/borgmatic.d /home/<myusername>/.config/borgmatic/config.yaml: No configuration files found

Expected behavior

Would be nice if borgmatic could search config in ~/.config/borgmatic.d/ and treat it the same way as /etc/borgmatic.d.

Environment

borgmatic version: 1.3.5

borgmatic installation method: standalone binary from TGZ

Borg version: 1.1.10

Python version: 3.5.2

operating system and version: Ubuntu 16.04 LTS

#### What I'm trying to do and why I try to use the per app config approach running borgmatic from my user account. I would like to use the approach of having different borgmatic configs for different sources within my home dir (e.g. work, private, music collection, pictures), to have different settings (e.g. retention). I don’t need to backup something from the system but only from within my users home, so I would like to keep everything local to the user account and not mess around with `/etc`. My scenario is to manually trigger pre-configured backups onto USB disks by just calling `borgmatic`. #### Actual behavior I just tried creating `~/.config/borgmatic.d/` but it’s not recognized. Borgmatic complains with: ``` /etc/borgmatic/config.yaml /etc/borgmatic.d /home/<myusername>/.config/borgmatic/config.yaml: No configuration files found ``` #### Expected behavior Would be nice if borgmatic could search config in `~/.config/borgmatic.d/` and treat it the same way as `/etc/borgmatic.d`. #### Environment **borgmatic version:** 1.3.5 **borgmatic installation method:** standalone binary from TGZ **Borg version:** 1.1.10 **Python version:** 3.5.2 **operating system and version:** Ubuntu 16.04 LTS
Owner

This makes sense to me, and should be easy to add. Thanks for suggesting it! In the meantime, if you'd like to accomplish the same thing with the version of borgmatic you're already using, you should be able to do this with:

borgmatic --config ~/.config/borgmatic.d/ ...
This makes sense to me, and should be easy to add. Thanks for suggesting it! In the meantime, if you'd like to accomplish the same thing with the version of borgmatic you're already using, you should be able to do this with: ```bash borgmatic --config ~/.config/borgmatic.d/ ... ```
witten added the
design finalized
label 2019-12-28 21:54:18 +00:00
Author

Ok. Thanks.

Ok. Thanks.
Owner

Implemented in master!

Implemented in master!
Author

Great! Thx.

Great! Thx.
Owner

Released in borgmatic 1.5.0!

Released in borgmatic 1.5.0!
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#274
No description provided.