mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 16:26: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
|
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
|
> :ToCPrevNext
|
||||||
|
@ -17,9 +17,8 @@ export const getPathFromBackend = (backend: Backend): string => {
|
|||||||
case 'gs':
|
case 'gs':
|
||||||
case 's3':
|
case 's3':
|
||||||
case 'sftp':
|
case 'sftp':
|
||||||
return `${backend.type}:${backend.path}`
|
|
||||||
case 'rest':
|
case 'rest':
|
||||||
throw new Error(`Unsupported backend type: "${backend.type}"`)
|
return `${backend.type}:${backend.path}`
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unknown backend type.`)
|
throw new Error(`Unknown backend type.`)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user