Add Google Cloud Storage as backend

Environment variables:
GOOGLE_PROJECT_ID=gcp-project-id
GOOGLE_APPLICATION_CREDENTIALS=path-to-json-file

Environment variables for test:
RESTIC_TEST_GS_PROJECT_ID=gcp-project-id
RESTIC_TEST_GS_APPLICATION_CREDENTIALS=path-to-json-file
RESTIC_TEST_GS_REPOSITORY=gs:us-central1/test-bucket

Init repository:
$ restic -r gs🪣/[prefix] init
This commit is contained in:
Dipta Das 2017-07-08 06:34:23 -07:00 committed by Alexander Neumann
parent 2c22ff175c
commit ba75a3884c
6 changed files with 654 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import (
"strings"
"github.com/restic/restic/internal/backend/b2"
"github.com/restic/restic/internal/backend/gs"
"github.com/restic/restic/internal/backend/local"
"github.com/restic/restic/internal/backend/rest"
"github.com/restic/restic/internal/backend/s3"
@ -32,6 +33,7 @@ var parsers = []parser{
{"local", local.ParseConfig},
{"sftp", sftp.ParseConfig},
{"s3", s3.ParseConfig},
{"gs", gs.ParseConfig},
{"swift", swift.ParseConfig},
{"rest", rest.ParseConfig},
}