Support specifying multiple host flags for various commands

The `dump`, `find`, `forget`, `ls`, `mount`, `restore`, `snapshots`,
`stats` and `tag` commands will now take into account multiple
`--host` and `-H` flags.
This commit is contained in:
Alexander Weiss
2020-02-26 22:17:59 +01:00
parent d70a4a9350
commit 9a9101d144
18 changed files with 87 additions and 53 deletions

View File

@@ -19,7 +19,7 @@ import (
// Config holds settings for the fuse mount.
type Config struct {
OwnerIsRoot bool
Host string
Hosts []string
Tags []restic.TagList
Paths []string
SnapshotTemplate string

View File

@@ -234,7 +234,7 @@ func updateSnapshots(ctx context.Context, root *Root) error {
return nil
}
snapshots, err := restic.FindFilteredSnapshots(ctx, root.repo, root.cfg.Host, root.cfg.Tags, root.cfg.Paths)
snapshots, err := restic.FindFilteredSnapshots(ctx, root.repo, root.cfg.Hosts, root.cfg.Tags, root.cfg.Paths)
if err != nil {
return err
}