restic-windows-backup icon indicating copy to clipboard operation
restic-windows-backup copied to clipboard

Unable to point out to my local repository

Open reyzafany opened this issue 3 years ago • 5 comments

To be honest I don't know much about programming but I'm interested to backup my app settings before doing a clean install on windows. So I downloaded latest github restic, created my repo in G:\restic_backup, but I can't for the love of god know how to figure the secrets.ps1 I changed the url to "G:\restic_backup" and it keeps shoving me with this error.

Fatal: create repository at <G:\restic_backup> failed: invalid backend
If the repo is in a local directory, you need to add a `local:` prefix

Is there any clearer instruction to configure this up? I don't know where to shove this local: prefix I tried some variation only to end with the same error message like

Fatal: create repository at <local:G:\restic_backup> failed: invalid backend
If the repo is in a local directory, you need to add a `local:` prefix

reyzafany avatar Dec 27 '21 05:12 reyzafany

EDIT: My problem was NOT related to this.

@reyzafany: (Next time) try without < >

cdrehner avatar Jan 16 '22 21:01 cdrehner

If it's just for reinstalling, just run restic manually.

rawtaz avatar Jan 16 '22 21:01 rawtaz

Thank you @rawtaz for your reply! I'm trying to setup restic for the first time. How do I sepcify the target (in my case it's a mounted smb share) correctly in my secrets.ps1? I have it this way and got the above mentioned error:

$Env:RESTIC_REPOSITORY='Y:\userbackups\'

cdrehner avatar Jan 16 '22 21:01 cdrehner

I'm not involved in this project and rarely use PowerShell so I can't give you an answer about the problem really.

I suggest you run restic manually instead, and if you have problems with that you are always free to ask in forum.restic.net if you are stuck on something. The documentation for how to use restic is at restic.readthedocs.io .

rawtaz avatar Jan 16 '22 22:01 rawtaz

Meanwhile, I figured it out. In case some one is having problems with setting up a restic backup on windows to a local SMB share, here's what helped me:

  • log in to (a) windows admin account and mount smb share
  • (optionally) log back in to regular user account
  • follow steps 1) to 3) in readme.md
  • in secrets.ps1: specify your repo as \\your.localnas.domain\somepath\userbackups AND NOT AS y:\userbackups (or which ever letter it's mapped to) !
  • follow steps 4) to 7)
  • in windows task scheduler, change the user to run the task as from SYSTEM to admin (or you privileged account), enter password. Not sure if this creates new problems, but looks fine so far.
  • proceed with step 8)

-> So this issue can probably be closed

cdrehner avatar Jan 16 '22 23:01 cdrehner

Thanks for following up - glad you sorted out your issue!

kmwoley avatar Jan 15 '23 04:01 kmwoley