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

TOML Files No Longer Parsed Correctly Starting From v0.9.0 #1420

Closed
ossie-git opened this issue Mar 2, 2025 · 4 comments
Closed

TOML Files No Longer Parsed Correctly Starting From v0.9.0 #1420

ossie-git opened this issue Mar 2, 2025 · 4 comments
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR

Comments

@ossie-git
Copy link

The latest versions of rustic (v.0.9.0+) tail to parse valid TOML files. Taking the example from here, we have the following:

[repository]
repository = "/backup/rustic"
password-file = "/root/key-rustic"
no-cache = true # no cache needed for local repository

[forget]
keep-daily = 14
keep-weekly = 5

[backup]
exclude-if-present = [".nobackup", "CACHEDIR.TAG"]
glob-file = ["/root/rustic-local.glob"]

[[backup.sources]]
source = "/home"
git-ignore = true

[[backup.sources]]
source = "/etc"

Running check fails:

$ rustic check -P official_example
error: rustic-rs fatal error: parse error: TOML parse error at line 14, column 1
   |
14 | [[backup.sources]]
   | ^^^^^^^^^^^^^^^^^^
invalid type: map, expected a string

Meanwhile, older versions (v0.8.1 and below) parsed the above file without issue:

[INFO] using config /home/vagrant/.config/rustic/official_example.toml
error: error opening password file `Os { code: 13, kind: PermissionDenied, message: "Permission denied" }`
@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Mar 2, 2025
@aawsome
Copy link
Member

aawsome commented Mar 2, 2025

@ossie-git Yes, 0.9 introduced breaking changes in the TOML config. You need to adapt your config, see https://rustic.cli.rs/docs/breaking_changes.html

@aawsome aawsome closed this as completed Mar 2, 2025
@ossie-git
Copy link
Author

Thanks @aawsome Shouldn't the example in the official documentation I linked to be updated to this?

@aawsome
Copy link
Member

aawsome commented Mar 2, 2025

@ossie-git Thanks - this is in fact a docu issue - I'll change it in a few minutes!

@aawsome
Copy link
Member

aawsome commented Mar 2, 2025

Docu is changed. Thanks for the reminder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants