From ed904dfac0d361a2f87e62cd2b94fd78b6b65ecb Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 30 Jun 2024 20:32:36 +0200 Subject: [PATCH 1/2] clarify that all paths specified using --path option must match --- cmd/restic/find.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/find.go b/cmd/restic/find.go index c7754d5d9..faf7024e1 100644 --- a/cmd/restic/find.go +++ b/cmd/restic/find.go @@ -17,7 +17,7 @@ func initMultiSnapshotFilter(flags *pflag.FlagSet, filt *restic.SnapshotFilter, } flags.StringArrayVarP(&filt.Hosts, "host", hostShorthand, nil, "only consider snapshots for this `host` (can be specified multiple times) (default: $RESTIC_HOST)") flags.Var(&filt.Tags, "tag", "only consider snapshots including `tag[,tag,...]` (can be specified multiple times)") - flags.StringArrayVar(&filt.Paths, "path", nil, "only consider snapshots including this (absolute) `path` (can be specified multiple times)") + flags.StringArrayVar(&filt.Paths, "path", nil, "only consider snapshots including this (absolute) `path` (can be specified multiple times, snapshots must include all specified paths)") // set default based on env if set if host := os.Getenv("RESTIC_HOST"); host != "" { @@ -30,7 +30,7 @@ func initMultiSnapshotFilter(flags *pflag.FlagSet, filt *restic.SnapshotFilter, func initSingleSnapshotFilter(flags *pflag.FlagSet, filt *restic.SnapshotFilter) { flags.StringArrayVarP(&filt.Hosts, "host", "H", nil, "only consider snapshots for this `host`, when snapshot ID \"latest\" is given (can be specified multiple times) (default: $RESTIC_HOST)") flags.Var(&filt.Tags, "tag", "only consider snapshots including `tag[,tag,...]`, when snapshot ID \"latest\" is given (can be specified multiple times)") - flags.StringArrayVar(&filt.Paths, "path", nil, "only consider snapshots including this (absolute) `path`, when snapshot ID \"latest\" is given (can be specified multiple times)") + flags.StringArrayVar(&filt.Paths, "path", nil, "only consider snapshots including this (absolute) `path`, when snapshot ID \"latest\" is given (can be specified multiple times, snapshots must include all specified paths)") // set default based on env if set if host := os.Getenv("RESTIC_HOST"); host != "" { From aa33af3e758b29ee1918963ec7c51a827b88fc5f Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 30 Jun 2024 20:33:50 +0200 Subject: [PATCH 2/2] update command help docs --- doc/manual_rest.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/manual_rest.rst b/doc/manual_rest.rst index 9d9d6e141..a7a0f96e0 100644 --- a/doc/manual_rest.rst +++ b/doc/manual_rest.rst @@ -54,7 +54,7 @@ Usage help is available: --cleanup-cache auto remove old cache directories --compression mode compression mode (only available for repository format version 2), one of (auto|off|max) (default: $RESTIC_COMPRESSION) (default auto) -h, --help help for restic - --http-user-agent value set a custom user agent for outgoing http requests + --http-user-agent string set a http user agent for outgoing http requests --insecure-no-password use an empty password for the repository, must be passed to every restic command (insecure) --insecure-tls skip TLS certificate verification when connecting to the repository (insecure) --json set output mode to JSON for commands that support it @@ -122,6 +122,7 @@ command: -x, --one-file-system exclude other file systems, don't cross filesystem boundaries and subvolumes --parent snapshot use this parent snapshot (default: latest snapshot in the group determined by --group-by and not newer than the timestamp determined by --time) --read-concurrency n read n files concurrently (default: $RESTIC_READ_CONCURRENCY or 2) + --skip-if-unchanged skip snapshot creation if identical to parent snapshot --stdin read backup from stdin --stdin-filename filename filename to use when reading from stdin (default "stdin") --stdin-from-command interpret arguments as command to execute and store its stdout @@ -135,7 +136,7 @@ command: --cache-dir directory set the cache directory. (default: use system default cache directory) --cleanup-cache auto remove old cache directories --compression mode compression mode (only available for repository format version 2), one of (auto|off|max) (default: $RESTIC_COMPRESSION) (default auto) - --http-user-agent value set a custom user agent for outgoing http requests + --http-user-agent string set a http user agent for outgoing http requests --insecure-no-password use an empty password for the repository, must be passed to every restic command (insecure) --insecure-tls skip TLS certificate verification when connecting to the repository (insecure) --json set output mode to JSON for commands that support it