-
-
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
autorestic check creates an empty string forgetoption that is invalid #194
Comments
I ran into the same, plus I ran into |
I'm also affected by this behaviour. Actually I'd like to prevent autorestic from automatically changing the configuration, as I provide that via Ansible. |
I ran into the same issue. It happens there, when checking a backend with no secret key: autorestic/internal/backend.go Line 113 in 3bc091f
The key generated and must be added to the configuration file, hence the file modification. When doing so autorestic/internal/location.go Lines 53 to 54 in 3bc091f
The problem is that it writes It thought about simply modifying I'll send a PR soon. |
I see. In our case the key is provided using an environment variable AUTORESTIC_CLOUD_RESTIC_PASSWORD ("CLOUD" being our backend name). So is this key not considered? |
@godvoigt I cannot reproduce your behaviour. With a backend named AUTORESTIC_CLOUD_RESTIC_PASSWORD=test autorestic -c <config_path> check will recognize the environment variable, internally setting |
@Chostakovitch I think we messed up then calling autorestic so that the environment variable was not set. |
I think we should simply remove the key generation feature and never write to the config at all. It makes not so much sense and introduces confusion with no real benefit. |
@cupcakearmy Yeah, totally agree. I'm also using Ansible and configuration rewriting is quite unexpected. Maybe #197 is still slightly relevant in case we need to write a configuration file in the future. |
It also seems to reformat and rearrange the config. i.e. version: 2 ended up as the last line after autorestic was done with my config file. |
Next bigger update I def. want to remove the generation feature. Also because as @ovizii the default go writer sorts everything alphabetically and mixes up everything and is kind of unexpected behaviour |
@cupcakearmy I'm currently being affected by this in a new project. I need to use The backends are created dynamically using terraform and are therefore empty when the first scheduled backup is to run. I want to use check to initialise them but then this issue is a blocker for that. Thanks. |
having this issue still |
Just ran into this issue as well. Deleting the key fixed it. |
Describe the bug
Running
autorestic check
against a yaml adds this config option to a location:However this is invalid if doing another check or doing the first backup.
Expected behavior
It works
Environment
Additional context
I had to remove the string for it to work, other than that it worked absolutely perfectly magically fantastically 🚀
The text was updated successfully, but these errors were encountered: