Hi, so I have a repo on an external drive on a windows server. I’m playing out the scenario of a crashed server and the need to restore repo to a different machine. However, when I try just checking the repo on another winbox (win 11), it tells me “wrong password or no key”. What do I need to do on origin server to prep the repo to be accessed on another winbox? Do I need to export key to a plaintext and take to the new machine and import? (Import-key doesn’t work in windows), nor apparently the masterkey commands. (restic v. 0.16.0 on both machines)
Here is where I am so far… I’m watching this video on environmental variables. I’ll give it a try. This guy needs a medal for his restic contribution, he made 30 short videos on restic!!
(yahoo/@DreQueary) https://youtu.be/pSDNk_XhY_g?si=2-4uGGgSV_uwqsOn
Additional findings; I am able to cat the masterkey from the original machine. I suspect I now need to import this masterkey into the new restic installation. (please correct any of this if I’m going astray guys… for posterity!!
In window cmd.exe
set RESTIC_PASSWORD=YourPasswordForRepo
Testing in the same window:
restic snapshots -r PathToRepo
Works for me
You need to provide one of the password, password file or password command. This can be done via a command line parameter or environment variable. The documentation provides more information on these. You do not need to do anything with the key file(s) other than ensure they’re in their original location, unmodified. A restic repo is portable across machines and architectures.
If you have further problems please ensure you follow the template when posting in the Getting Help section, as you have omitted information that’s needed to help you.
Just run the restic restore command without the password and restic will ask to paste de password
On my case:
restic -r rclone:backup:“e:\Backup” restore latest --target “C:\restore” --include “D\Documents”