forked from TrueCloudLab/restic
fix(backup): Switch tags cobra type to handle comma-separated list
This commit is contained in:
parent
913a34f568
commit
ae441d3134
2 changed files with 3 additions and 3 deletions
|
@ -91,7 +91,7 @@ type BackupOptions struct {
|
|||
ExcludeLargerThan string
|
||||
Stdin bool
|
||||
StdinFilename string
|
||||
Tags []string
|
||||
Tags restic.TagList
|
||||
Host string
|
||||
FilesFrom []string
|
||||
TimeStamp string
|
||||
|
@ -121,7 +121,7 @@ func init() {
|
|||
f.StringVar(&backupOptions.ExcludeLargerThan, "exclude-larger-than", "", "max `size` of the files to be backed up (allowed suffixes: k/K, m/M, g/G, t/T)")
|
||||
f.BoolVar(&backupOptions.Stdin, "stdin", false, "read backup from stdin")
|
||||
f.StringVar(&backupOptions.StdinFilename, "stdin-filename", "stdin", "`filename` to use when reading from stdin")
|
||||
f.StringArrayVar(&backupOptions.Tags, "tag", nil, "add a `tag` for the new snapshot (can be specified multiple times)")
|
||||
f.Var(&backupOptions.Tags, "tag", "add `tags` for the new snapshot in the format `tag[,tag,...]` (can be specified multiple times)")
|
||||
|
||||
f.StringVarP(&backupOptions.Host, "host", "H", "", "set the `hostname` for the snapshot manually. To prevent an expensive rescan use the \"parent\" flag")
|
||||
f.StringVar(&backupOptions.Host, "hostname", "", "set the `hostname` for the snapshot manually")
|
||||
|
|
|
@ -717,7 +717,7 @@ func resolveRelativeTargets(filesys fs.FS, targets []string) ([]string, error) {
|
|||
|
||||
// SnapshotOptions collect attributes for a new snapshot.
|
||||
type SnapshotOptions struct {
|
||||
Tags []string
|
||||
Tags restic.TagList
|
||||
Hostname string
|
||||
Excludes []string
|
||||
Time time.Time
|
||||
|
|
Loading…
Reference in a new issue