rest-server icon indicating copy to clipboard operation
rest-server copied to clipboard

Using multiple bind mounts with private repositories enabled

Open littlegraycells opened this issue 10 months ago • 1 comments

Output of rest-server --version

restic/rest-server | latest | e4fb8546f625 | 8 months ago | 15.3MB

Problem description / Steps to reproduce

My setup includes two separate bind mounts (which are actually 2 separate disks attached to the host), which I mount into /data such that I have something like /data/sda and /data/sdb` inside the container. What I want to do is to have separate sets of repositories in these two locations.

Expected behavior

With private repos enabled, I should be able to create a repo using rest:https://user:pass@fqdn/sda/repo and/or rest:https://user:pass@fqdn/sda/user/repo.

Actual behavior

If I don't use private repositories, I am able to create repos with rest:https://user:pass@fqdn/sda/repo or rest:https://user:pass@fqdn/sda/user/repo. However, if I enable private repos, neither of those work, only rest:https://user:pass@fqdn/user/repo.

Do you have any idea what may have caused this?

No. I imagine the code is enforcing some sort of path requirements with private repos?

Did rest-server help you today? Did it make you happy in any way?

Yes, I am really happy with this project. This combined with backrest is ❤

littlegraycells avatar Apr 04 '25 03:04 littlegraycells

The whole point of private repositories is to force the first part of the url path to match the username. That is the URL structure is then always rest.server/$USER/repo. The user name can't show up in arbitrary sections of the path as then rest-server wouldn't be able to distinguish between user and repository name.

MichaelEischer avatar Apr 14 '25 19:04 MichaelEischer