Windows Error Fatal: create repository

Hi, I’m new to restic. Was planning on using restic to backup windows boxes at my workplace. I keep getting the following error(s) when trying to initialize a repository with restic to a new Wasabi S3 Bucket.

Followed the Docs, first issue is you can’t export on Windows so there needs to be seperate docs for that. PowerShell Variable Example but I added the proper variables.

PS C:\Users\username> Set-Variable -Name "AWS_ACCESS_KEY_ID" -Value "<my-access-key>"
PS C:\Users\username> Set-Variable -Name "AWS_SECRET_ACCESS_KEY" -Value "<my-secret-key>"

PS C:\Users\username> Get-Variable -Name "AWS_ACCESS_KEY_ID"

Name                    Value
----                    -----
AWS_SECRET_ACCESS_KEY   <my-access-key>
PS C:\Users\username> restic init --repo s3:<bucket-name>
Fatal: create repository at s3:<bucket-name> failied: client.MakeBucket: Anonymous user cannot create bucket

I understand that Wasabi has the concept of ‘users’ but I created the user as the Programmatic (create API key) option and then used the keys for the vars above. I even created an completely new user and keys same issues. Is there something that I’m missing? How do I define the “user” to restic? If anyone has any experience with restic and windows, any guidance would be greatly appreciated. Thanks.


restic --repo s3:<bucket-name> init

I have zero knowledge of Wasabi. For Windows Powershell I have used the following commands to pass some data to restic:

$RESTIC_PASSWORD_FILE= 'D:\blablabla\secrets.txt'

Those commands pass the data to the “environment” in the style of a .bat file. I also pass a specific temp directory which is on a hard drive not a SSD so the SSD is not overused, and the cache dir a specific dir for restic caches only. I’m not at all sure if this message will help you.

nope, got the exact same error message. Was worth a shot though. Thanks.

----- SOLVED -----

OK I found the Solution from kmwoley/restic-windows-backup in the secrets_template.ps1 file the AWS_ACCESS_KEY_ID var gets specified with.


So I tried it with the install.ps1 script and it worked. Then I specified and additional repository using the $Env: format and it was able to add the repository corretly.

It would be very helpful for new users if the Docs for Windows Specified this caveat. I would like to help contribute to the docs, if someone can tell me how to do that, Thanks.

1 Like