emuell / restic-browser

A GUI to browse and restore restic backup repositories.
MIT License
597 stars 16 forks source link

Mistake parsing `$RESTIC_REPOSITORY` if it starts with `s3:` #89

Closed ilyagr closed 6 months ago

ilyagr commented 6 months ago

When I run RESTIC_REPOSITORY=s3:s3.us-east-005.backblazeb2.com/... open -a Restic-Browser on Mac OS, restic-browser gets confused by the URL. It considers s3: to be part of the URL and fails to open it. See the screenshot (I used a fake URL for the screenshot, but a real one results in the same thing):

Screenshot 2023-12-27 at 11 38 15 PM

Fortunately, this is reasonably quick to fix if I click the "Open Repository" button and fix the URL each time.

jmclaren7 commented 6 months ago

I see the same behavior on Windows too.

image

emuell commented 6 months ago

Thanks for reporting. This will be fixed here https://github.com/emuell/restic-browser/pull/91

landrix commented 6 months ago

I think that applies too

https://github.com/emuell/restic-browser/pull/81#issuecomment-1871870580

--repo rest:http://... dosn't work.

emuell commented 6 months ago

@landrix could you please check if the builds here fix your problem too: https://github.com/emuell/restic-browser/actions/runs/7346864179

landrix commented 6 months ago

@landrix could you please check if the builds here fix your problem too: https://github.com/emuell/restic-browser/actions/runs/7346864179

yes, problem fixed, thanks

jmclaren7 commented 5 months ago

@emuell Something might still be wrong, maybe --repo is being processed correctly but RESTIC_REPOSITORY doesn't seem to be.

On the linked build, I get these results:

RESTIC_REPOSITORY=s3:s3.us-west-001.backblazeb2.com/john-testing2

image

emuell commented 5 months ago

The url looks fine, so this seems to be a different problem. Probably a temporary connection problem to Backblaze?

jmclaren7 commented 5 months ago

@emuell oh man, I missed something in my own script that launches restic-browser, nothing is wrong with the update you made, sorry about that.

You might have missed that small difference in the URL "s3.us-" vs "s33.us-" between what the ENV was set to and what showed in restic-browser. It was because I was testing the new command line parameter in my script and made a typo with the "s33.us-". I kept seeing the ENV set correctly but the GUI showing something different and it was driving me nuts.

Thank you so much for the work you've done on this project, I have practical use for it but I've also been using it to get more familiar with go and now rust (slow going).

emuell commented 5 months ago

No problem. Glad to hear it has been resolved. Thanks for the kind words!