From 76c0b77cb53f29a4a6a9ba48c1c075c445b00170 Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Thu, 10 Jan 2019 12:48:37 -0700 Subject: [PATCH] upgrade to restic v0.9.4 and replace --hostname with --host Signed-off-by: Steve Kriss --- Dockerfile-ark.alpine | 6 +++--- pkg/restic/command_factory.go | 4 ++-- pkg/restic/command_factory_test.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile-ark.alpine b/Dockerfile-ark.alpine index 2fb1a3492..7fff5c39f 100644 --- a/Dockerfile-ark.alpine +++ b/Dockerfile-ark.alpine @@ -19,9 +19,9 @@ MAINTAINER Andy Goldstein RUN apk add --no-cache ca-certificates RUN apk add --update --no-cache bzip2 && \ - wget --quiet https://github.com/restic/restic/releases/download/v0.9.3/restic_0.9.3_linux_amd64.bz2 && \ - bunzip2 restic_0.9.3_linux_amd64.bz2 && \ - mv restic_0.9.3_linux_amd64 /usr/bin/restic && \ + wget --quiet https://github.com/restic/restic/releases/download/v0.9.4/restic_0.9.4_linux_amd64.bz2 && \ + bunzip2 restic_0.9.4_linux_amd64.bz2 && \ + mv restic_0.9.4_linux_amd64 /usr/bin/restic && \ chmod +x /usr/bin/restic ADD /bin/linux/amd64/ark /ark diff --git a/pkg/restic/command_factory.go b/pkg/restic/command_factory.go index 4d1a993d1..c216bd636 100644 --- a/pkg/restic/command_factory.go +++ b/pkg/restic/command_factory.go @@ -23,7 +23,7 @@ import ( // BackupCommand returns a Command for running a restic backup. func BackupCommand(repoIdentifier, passwordFile, path string, tags map[string]string) *Command { - // --hostname flag is provided with a generic value because restic uses the hostname + // --host flag is provided with a generic value because restic uses the host // to find a parent snapshot, and by default it will be the name of the daemonset pod // where the `restic backup` command is run. If this pod is recreated, we want to continue // taking incremental backups rather than triggering a full one due to a new pod name. @@ -34,7 +34,7 @@ func BackupCommand(repoIdentifier, passwordFile, path string, tags map[string]st PasswordFile: passwordFile, Dir: path, Args: []string{"."}, - ExtraFlags: append(backupTagFlags(tags), "--hostname=ark"), + ExtraFlags: append(backupTagFlags(tags), "--host=ark"), } } diff --git a/pkg/restic/command_factory_test.go b/pkg/restic/command_factory_test.go index 636ddf849..610831875 100644 --- a/pkg/restic/command_factory_test.go +++ b/pkg/restic/command_factory_test.go @@ -32,7 +32,7 @@ func TestBackupCommand(t *testing.T) { assert.Equal(t, "path", c.Dir) assert.Equal(t, []string{"."}, c.Args) - expected := []string{"--tag=foo=bar", "--tag=c=d", "--hostname=ark"} + expected := []string{"--tag=foo=bar", "--tag=c=d", "--host=ark"} sort.Strings(expected) sort.Strings(c.ExtraFlags) assert.Equal(t, expected, c.ExtraFlags)