Skip to content

Commit

Permalink
Add support for restic skip-unchanged
Browse files Browse the repository at this point in the history
(cherry picked from commit 56ef807)
  • Loading branch information
dymurray authored and sseago committed Jun 16, 2022
1 parent 52a4a90 commit 2c29d6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/restic/command_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func RestoreCommand(repoIdentifier, passwordFile, snapshotID, target string) *Co
PasswordFile: passwordFile,
Dir: target,
Args: []string{snapshotID},
ExtraFlags: []string{"--target=."},
ExtraFlags: []string{"--target=.", "--skip-unchanged", "--delete"},
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/restic/command_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestRestoreCommand(t *testing.T) {
assert.Equal(t, "password-file", c.PasswordFile)
assert.Equal(t, "target", c.Dir)
assert.Equal(t, []string{"snapshot-id"}, c.Args)
assert.Equal(t, []string{"--target=."}, c.ExtraFlags)
assert.Equal(t, []string{"--target=.", "--skip-unchanged", "--delete"}, c.ExtraFlags)
}

func TestGetSnapshotCommand(t *testing.T) {
Expand Down

0 comments on commit 2c29d6e

Please sign in to comment.