Let generate-borgmatic-config override existing files. #539

Closed
opened 2022-05-29 13:59:58 +00:00 by ams_tschoening · 2 comments

What I'm trying to do and why

I maintain all my YAML configs using SVN and after upgrading BorgMatic to 1.6.1, tried the process of generate-borgmatic-config for the first time. The important thign to note is that I really checkout those configs at the server backing things up as well. So for my workflow there's not really the need to force users to upgrade the configs into an additional file, but instead make things more difficult:

If overwriting the source file would be possible, I could use svn diff either on the server or simply after downloading the whole file tree e.g. using pscp to my client with support for GUI to modify new configs according to my needs. With additional files in place, I need to rename or delete or copy more than necessary.

Other notes / implementation ideas

Maybe some --force option would be enough already to prevent the check for an existing file. Or maybe optionally output destination contents to STDOUT, so one can redirect using the shell into the source file.

Thanks!

Environment

borgmatic version: 1.5.24
borgmatic installation method: PIP, system wide
Borg version: 1.1.16
Python version: 3.8.10
operating system and version: Ubuntu 20.04

#### What I'm trying to do and why I maintain all my YAML configs using SVN and after upgrading BorgMatic to 1.6.1, tried the process of `generate-borgmatic-config` for the first time. The important thign to note is that I really checkout those configs at the server backing things up as well. So for my workflow there's not really the need to force users to upgrade the configs into an additional file, but instead make things more difficult: If overwriting the source file would be possible, I could use `svn diff` either on the server or simply after downloading the whole file tree e.g. using `pscp` to my client with support for GUI to modify new configs according to my needs. With additional files in place, I need to rename or delete or copy more than necessary. #### Other notes / implementation ideas Maybe some `--force` option would be enough already to prevent the check for an existing file. Or maybe optionally output destination contents to STDOUT, so one can redirect using the shell into the source file. Thanks! #### Environment **borgmatic version:** 1.5.24 **borgmatic installation method:** PIP, system wide **Borg version:** 1.1.16 **Python version:** 3.8.10 **operating system and version:** Ubuntu 20.04
Owner

I've implemented this in master with a new "--overwrite" flag. It'll be part of the next release. Thanks for the suggestion!

I've implemented this in master with a new "--overwrite" flag. It'll be part of the next release. Thanks for the suggestion!
Owner

This has been released in borgmatic 1.6.2!

This has been released in borgmatic 1.6.2!
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#539
No description provided.