mirror of
https://github.com/vmware-tanzu/velero.git
synced 2025-12-23 14:25:22 +00:00
upgrade to restic v0.9.4 and replace --hostname with --host
Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
@@ -19,9 +19,9 @@ MAINTAINER Andy Goldstein <andy@heptio.com>
|
|||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
|
|
||||||
RUN apk add --update --no-cache bzip2 && \
|
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 && \
|
wget --quiet https://github.com/restic/restic/releases/download/v0.9.4/restic_0.9.4_linux_amd64.bz2 && \
|
||||||
bunzip2 restic_0.9.3_linux_amd64.bz2 && \
|
bunzip2 restic_0.9.4_linux_amd64.bz2 && \
|
||||||
mv restic_0.9.3_linux_amd64 /usr/bin/restic && \
|
mv restic_0.9.4_linux_amd64 /usr/bin/restic && \
|
||||||
chmod +x /usr/bin/restic
|
chmod +x /usr/bin/restic
|
||||||
|
|
||||||
ADD /bin/linux/amd64/velero /velero
|
ADD /bin/linux/amd64/velero /velero
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
// BackupCommand returns a Command for running a restic backup.
|
// BackupCommand returns a Command for running a restic backup.
|
||||||
func BackupCommand(repoIdentifier, passwordFile, path string, tags map[string]string) *Command {
|
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
|
// 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
|
// 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.
|
// 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,
|
PasswordFile: passwordFile,
|
||||||
Dir: path,
|
Dir: path,
|
||||||
Args: []string{"."},
|
Args: []string{"."},
|
||||||
ExtraFlags: append(backupTagFlags(tags), "--hostname=velero"),
|
ExtraFlags: append(backupTagFlags(tags), "--host=velero"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ func TestBackupCommand(t *testing.T) {
|
|||||||
assert.Equal(t, "path", c.Dir)
|
assert.Equal(t, "path", c.Dir)
|
||||||
assert.Equal(t, []string{"."}, c.Args)
|
assert.Equal(t, []string{"."}, c.Args)
|
||||||
|
|
||||||
expected := []string{"--tag=foo=bar", "--tag=c=d", "--hostname=velero"}
|
expected := []string{"--tag=foo=bar", "--tag=c=d", "--host=velero"}
|
||||||
sort.Strings(expected)
|
sort.Strings(expected)
|
||||||
sort.Strings(c.ExtraFlags)
|
sort.Strings(c.ExtraFlags)
|
||||||
assert.Equal(t, expected, c.ExtraFlags)
|
assert.Equal(t, expected, c.ExtraFlags)
|
||||||
|
|||||||
Reference in New Issue
Block a user