mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
Merge pull request #26 from sumnerboy12/patch-1
add support for rest server backends
This commit is contained in:
commit
e7be01da37
@ -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}"`)
|
||||
return `${backend.type}:${backend.path}`
|
||||
default:
|
||||
throw new Error(`Unknown backend type.`)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user