add support for rest server backends
@ -48,4 +48,15 @@ backends:
path: my-host:/remote/path/on/the/server
```
## Rest Server
See [here](https://github.com/restic/rest-server) for how to install a rest server backend and [here](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#rest-server) for further documentation.
```yaml
backends:
name-of-backend:
type: rest
path: http://localhost:8000/repo_name
> :ToCPrevNext
@ -17,9 +17,8 @@ export const getPathFromBackend = (backend: Backend): string => {
case 'gs':
case 's3':
case 'sftp':
return `${backend.type}:${backend.path}`
case 'rest':
throw new Error(`Unsupported backend type: "${backend.type}"`)
default:
throw new Error(`Unknown backend type.`)
}