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

forgetoption Could not parse config file! #315

Open
mluettermann opened this issue Jul 21, 2023 · 8 comments
Open

forgetoption Could not parse config file! #315

mluettermann opened this issue Jul 21, 2023 · 8 comments

Comments

@mluettermann
Copy link

Describe the bug
i am not able to create an backup with an simple autorestic.yml

my autorestic.yaml file
`version: 2

locations:
my-locations:
from: /data
to: hdd

backends:
hdd:
type: local
path: /backup`

Expected behavior
responce from the autoresctic check

'autorestic check
Using config: /root/.autorestic.yaml
Using lock: /root/.autorestic.lock.yml
Saved a backup copy of your file next to the original.
Initializing backend "hdd"...
Everything is fine.'

error output while autorestic backup -a

'autorestic backup -a
Using config: /root/.autorestic.yaml
1 error(s) decoding:

  • 'locations[my-locations]' has invalid keys: forgetoption
    Could not parse config file!
    Using lock: /root/.autorestic.lock.yml'

why i get this responce ? has invalid keys: forgetoption Could not parse config file!

Environment

  • OS: Ubuntu
  • Version: 22.04
  • autorestic version 1.7.7
  • restic 0.15.2 compiled with go1.20.3 on linux/amd64
@dolgarev
Copy link

dolgarev commented Aug 3, 2023

I have the same issue with Debian 12. Any news here?

@ts-mk
Copy link

ts-mk commented Aug 28, 2023

The same happens to locations -> name -> copy which becomes copyoption.

@wutr
Copy link

wutr commented Aug 29, 2023

#194

Manually remove the offending yaml key (forgetoption and maybe a few more) as a workaround.

@zkhan93
Copy link

zkhan93 commented Sep 18, 2023

#194

Manually remove the offending yaml key (forgetoption and maybe a few more) as a workaround.

I tried this, but the invalid keys re-appear.

UPDATE: I was missing env variables, after providing proper env it worked.

@mrkeypad
Copy link

mrkeypad commented Oct 2, 2023

UPDATE: I was missing env variables, after providing proper env it worked.

cant you please explain how did you do that? what is the correct env config? cant find anythig in docs :(

@zkhan93
Copy link

zkhan93 commented Oct 2, 2023

UPDATE: I was missing env variables, after providing proper env it worked.

cant you please explain how did you do that? what is the correct env config? cant find anythig in docs :(

correct config should look like this, once the config is correct, manually removing the offending keys in temporary yaml will work.

.autorestic.yaml


locations:
  ...

backends:
  bb-data
    type: b2
    path: '...'

.autorestic.env

AUTORESTIC_BB-DATA_RESTIC_PASSWORD=...
AUTORESTIC_BB-DATA_B2_ACCOUNT_ID=...
AUTORESTIC_BB-DATA_B2_ACCOUNT_KEY=...

when I was getting this error, .autorestic.env was not providing correct keys for bb-data backend.
reference doc

@cloudrck
Copy link

I'm seeing the same issue on Arch Linux and FreeBSD 14.

Using SFTP as only backend.

autorestic version 1.7.9

@nununo
Copy link

nununo commented Jan 20, 2024

I too was having this issue. Thank you @zkhan93 for giving me the clue. Indeed, when I added the missing repository key everything started working fine.

Still, this issue should be corrected and a more adequate error raised.

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

8 participants