Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running autorestic check breaks the YAML file by adding invalid parameters #428

Open
ResponsiblyUnranked opened this issue Feb 9, 2025 · 1 comment

Comments

@ResponsiblyUnranked
Copy link

Describe the bug
When I run autorestic check after creating a new backend (in order to initialise the backend) it modifies my ~/.autorestic.yml file and breaks the syntax. After running it, if I run check a second time I get:

3 error(s) decoding:

* 'locations[apps]' has invalid keys: forgetoption
* 'locations[jellyfin-config]' has invalid keys: forgetoption
* 'locations[jellyfin-media]' has invalid keys: forgetoption
Could not parse config file!

I did not add this forgetoption to my locations and the issue seems resolved when I remove it. Autorestic seems to add it to every location (amongst other properties), for example:

  jellyfin-config:
    from:
    - jellyfin-config
    type: volume
    to:
    - local-config
    - backblaze
    - local-two
    hooks:
      dir: ""
      prevalidate: []
      before: []
      after: []
      success: []
      failure: []
    cron: ""
    options: {}
    forgetoption: ""
    copyoption: {}

It's that forgetoption: "" which autorestic check is adding, and then causing problems with.

Before running autorestic check all that I had was:

  jellyfin-config:
    from: jellyfin-config
    type: volume
    to: backblaze

Expected behavior
Running autorestic check should not break the YAML file I have already created. I also find it strange that it adds loads of empty parameters. Is it possible to not do this, as the config file is much smaller and easier to work with, as I only need a barebones setup.

Environment

  • Ubuntu 24.04.1 LTS
  • Autorestic Version 1.8.3

Additional context
It seems to happen whenever I create a new backend and then run autorestic check.

@waza-ari
Copy link

Exactly the same issue here, check seems to modify the configuration file and adding invalid parameters like the mentioned forgetoption. It happens when running check after adding a second backend, no matter if the configuration is correct or now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants