forked from TrueCloudLab/restic
fix(cmd_backup): Use restic.TagLists
This commit is contained in:
parent
334d8ce724
commit
e88f3fb80c
2 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ type BackupOptions struct {
|
||||||
ExcludeLargerThan string
|
ExcludeLargerThan string
|
||||||
Stdin bool
|
Stdin bool
|
||||||
StdinFilename string
|
StdinFilename string
|
||||||
Tags restic.TagList
|
Tags restic.TagLists
|
||||||
Host string
|
Host string
|
||||||
FilesFrom []string
|
FilesFrom []string
|
||||||
FilesFromVerbatim []string
|
FilesFromVerbatim []string
|
||||||
|
@ -682,7 +682,7 @@ func runBackup(opts BackupOptions, gopts GlobalOptions, term *termstatus.Termina
|
||||||
|
|
||||||
snapshotOpts := archiver.SnapshotOptions{
|
snapshotOpts := archiver.SnapshotOptions{
|
||||||
Excludes: opts.Excludes,
|
Excludes: opts.Excludes,
|
||||||
Tags: opts.Tags,
|
Tags: opts.Tags.Flatten(),
|
||||||
Time: timeStamp,
|
Time: timeStamp,
|
||||||
Hostname: opts.Host,
|
Hostname: opts.Host,
|
||||||
ParentSnapshot: *parentSnapshotID,
|
ParentSnapshot: *parentSnapshotID,
|
||||||
|
|
|
@ -662,7 +662,7 @@ func TestBackupTags(t *testing.T) {
|
||||||
"expected no tags, got %v", newest.Tags)
|
"expected no tags, got %v", newest.Tags)
|
||||||
parent := newest
|
parent := newest
|
||||||
|
|
||||||
opts.Tags = []string{"NL"}
|
opts.Tags = restic.TagLists{[]string{"NL"}}
|
||||||
testRunBackup(t, "", []string{env.testdata}, opts, env.gopts)
|
testRunBackup(t, "", []string{env.testdata}, opts, env.gopts)
|
||||||
testRunCheck(t, env.gopts)
|
testRunCheck(t, env.gopts)
|
||||||
newest, _ = testRunSnapshots(t, env.gopts)
|
newest, _ = testRunSnapshots(t, env.gopts)
|
||||||
|
|
Loading…
Reference in a new issue