Merge pull request #26 from sumnerboy12/patch-1

add support for rest server backends
pull/27/head
Nicco 4 years ago committed by GitHub
commit e7be01da37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save