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

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

Open
AlphaJack opened this issue Mar 14, 2024 · 2 comments
Labels
A-filesystem Area: Related to the Filesystem in one way or the other A-ui-ux Area: Related to user interfaces and user experience C-bug Category: Something isn't working as expected

Comments

@AlphaJack
Copy link

AlphaJack commented Mar 14, 2024

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?

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Mar 14, 2024
@AlphaJack
Copy link
Author

The same is true for the command line, repo has to be in D:\\Backup format:

PS C:\Users\Jack> rustic --log-level trace --repo "D:/Backup" restore latest "C:/Users/Jack/Desktop"
error: Matching variant not found


PS C:\Users\Jack> rustic --log-level trace --repo "D:\\Backup" restore latest "C:/Users/Jack/Desktop"
ok

@simonsan simonsan added C-bug Category: Something isn't working as expected A-ui-ux Area: Related to user interfaces and user experience A-filesystem Area: Related to the Filesystem in one way or the other and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Mar 15, 2024
@will-molloy
Copy link

Since 0.7.0 I had to change my windows paths with an additional escape character.

E.g. "D:\\\\Backup" rather than "D:\\Backup".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-filesystem Area: Related to the Filesystem in one way or the other A-ui-ux Area: Related to user interfaces and user experience C-bug Category: Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants