rustic icon indicating copy to clipboard operation
rustic copied to clipboard

`error: Matching Variant not found` when repository is in format "D:/Repo" instead of "D:\\Repo"

Open AlphaJack opened this issue 1 year ago • 2 comments

This is my Windows configuration:

[repository]
repository = "D:/Backup/rustic/Test"
password = "XXXXXX"

[[backup.sources]]
source = "C:/Users/Jack/Desktop/Test"

When I launch rustic --log-level trace -P "C:/Users/Jack/Desktop/testconf" init, I receive this:

[INFO] Using config C:/Users/Jack/Desktop/testconf.toml
error: Matching Variant not found

I tried the following combinations:

Repo Source Result
repository = "D:/Backup" source = "C:/Test" "error: Matching Variant not found"
repository = "/D/Backup" source = "C:/Test" init at C:\D\Backup, backup ok
repository = "D:\\Backup" source = "C:\\Test" init ok, backup cannot find files
repository = "D:\\Backup" source = "C:/Test" init ok, backup ok

Why it is not possible to use repository = "D:/Backup", or source = "C:\\Test"?

Even with `source = "C:/Test", in the log file I read this:

11:43:18 [DEBUG] (1) rustic_core::archiver::tree_archiver: new       file: "C:\\Test\\newfile.txt"

Assuming I delete the source folder "C:/Users/Jack/Desktop/Test", and I want to restore from backup, which extract directory and format should I use in Windows to have rustic restore to recreate exactly that folder?

AlphaJack avatar Mar 14 '24 10:03 AlphaJack