Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Discussion options

You must be logged in to vote

Nevermind, solved.

Run:

yq eval 'del(.locations[].forgetoption | select(. == "")) | del(.locations[].copyoption | select(length == 0))' config/.autorestic.yaml > config/.autorestic.yaml.tmp && mv config/.autorestic.yaml.tmp config/.autorestic.yaml

- command to remove locations[your_location].forgetoption andlocations[your_location].copyoption props that are causing 'locations[home_user]' has invalid keys: forgetoption error.

This code line uses yq package that should be installed. And this line does not make any backup copy. Instead, it rewrites the .autorestic.yaml file, So change it accordingly if you need to keep original version of autorestic config file.

Track this issue on forgetoption

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kenya-West
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant