From 1243721a7e6a11d1dd34e5388d45e3d0d609e81b Mon Sep 17 00:00:00 2001 From: Ben Jones Date: Thu, 23 Jul 2020 15:21:55 +1200 Subject: [PATCH] add support for rest server backends Backend configuration would be; ``` rest_repo: type: rest path: http://backup:8001/repo_name ``` Would result in the following env var; ``` RESTIC_REPOSITORY=rest:http://backup:8001/repo_name ``` --- src/backend.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend.ts b/src/backend.ts index 3b9e81b..566f89e 100644 --- a/src/backend.ts +++ b/src/backend.ts @@ -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.`) }