-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Disable auto key generation for config managment #202
Comments
I think I'll remove writing to config. Makes a lot of thinks more complicated that they need to be and creates confusion |
Adding a new command to generate the key rather than editing the config would be great |
I've done some digging and it seems like writing the config file is only done if:
See: autorestic/internal/backend.go Lines 103 to 118 in 62a81d1
If your In my case, I defined a backend named autorestic/internal/backend.go Lines 74 to 81 in 62a81d1
To fix my issue, I changed the backend name name not to include To fix this in general I think that removing the behavior that write to the config file is probably a good idea tho I think that we can do more to avoid confusion. Specifically, I'm suggesting:
|
Would it be possible to allow also AUTORESTIC_{BACKEND}_RESTIC_PASSWORD=... I would prefer AUTORESTIC_{BACKEND}_RESTIC_PASSWORD_COMMAND='pass show backup/autorestic' |
Is your feature request related to a problem? Please describe.
I'm using config management to deploy autorestic on multiple servers. My ansible role creates autorestic config files in a declarative manner.
Even though I like the idea of auto-generating keys, and adding them to the config file for interactive sessions, this functionality stands against the principle of declarative config management.
Usually it works well when I provide a key with ansible, so autorestic doesn't need to modify the config file. However, there are situations where you try to setup a new backend and doen't supply the key yet, and a auto-modified config is pretty confusing.
Describe the solution you'd like
--no-key-generation
)First I thought it would be good to ask the user for permission to modify the config file but in automated backups using cron jobs i.e. this is not possible, so autorestic should just fail in case of a missing key, if this option is set.
What do you think ?
The text was updated successfully, but these errors were encountered: