From 496ea804a6c9735ee99118da1025e3d0ca082ca6 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 16 May 2026 11:39:14 +0200 Subject: [PATCH] check/dump/mount/repair/rewrite: update command description --- cmd/restic/cmd_check.go | 10 +++++++--- cmd/restic/cmd_dump.go | 2 +- cmd/restic/cmd_mount.go | 4 ++-- cmd/restic/cmd_repair.go | 8 ++++++-- cmd/restic/cmd_rewrite.go | 12 +++++------- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/cmd/restic/cmd_check.go b/cmd/restic/cmd_check.go index 6ec24baf2..27f7720e4 100644 --- a/cmd/restic/cmd_check.go +++ b/cmd/restic/cmd_check.go @@ -31,10 +31,14 @@ func newCheckCommand(globalOptions *global.Options) *cobra.Command { Short: "Check the repository for errors", Long: ` The "check" command tests the repository for errors and reports any errors it -finds. It can also be used to read all data and therefore simulate a restore. +finds. -By default, the "check" command will always load all data directly from the -repository and not use a local cache. +By default, check verifies the structural consistency and integrity of +snapshots, trees and pack files. To also verify the integrity of the actual +backed-up data, use the --read-data or --read-data-subset flags. + +By default, check creates a new temporary cache directory to verify data. +To reuse the existing cache, use the --with-cache flag. EXIT STATUS =========== diff --git a/cmd/restic/cmd_dump.go b/cmd/restic/cmd_dump.go index 6a5e3adb6..20904b43c 100644 --- a/cmd/restic/cmd_dump.go +++ b/cmd/restic/cmd_dump.go @@ -23,7 +23,7 @@ func newDumpCommand(globalOptions *global.Options) *cobra.Command { var opts DumpOptions cmd := &cobra.Command{ Use: "dump [flags] snapshotID file", - Short: "Print a backed-up file to stdout", + Short: "Print backed-up files or folders to stdout", Long: ` The "dump" command extracts files from a snapshot from the repository. If a single file is selected, it prints its contents to stdout. Folders are output diff --git a/cmd/restic/cmd_mount.go b/cmd/restic/cmd_mount.go index 96f217880..c0f446193 100644 --- a/cmd/restic/cmd_mount.go +++ b/cmd/restic/cmd_mount.go @@ -36,8 +36,8 @@ func newMountCommand(globalOptions *global.Options) *cobra.Command { Use: "mount [flags] mountpoint", Short: "Mount the repository", Long: ` -The "mount" command mounts the repository via fuse over a writeable directory. -The repository will be mounted read-only. +The "mount" command mounts the repository read-only via FUSE at the given +mountpoint. Snapshot Directories ==================== diff --git a/cmd/restic/cmd_repair.go b/cmd/restic/cmd_repair.go index 6181e7dfe..fccb47992 100644 --- a/cmd/restic/cmd_repair.go +++ b/cmd/restic/cmd_repair.go @@ -7,8 +7,12 @@ import ( func newRepairCommand(globalOptions *global.Options) *cobra.Command { cmd := &cobra.Command{ - Use: "repair", - Short: "Repair the repository", + Use: "repair", + Short: "Repair the repository", + Long: ` +The "repair" command repairs damaged repositories. It provides subcommands to +rebuild the index, salvage damaged pack files, and repair broken snapshots. +`, GroupID: cmdGroupDefault, DisableAutoGenTag: true, } diff --git a/cmd/restic/cmd_rewrite.go b/cmd/restic/cmd_rewrite.go index f5826c79f..976fe4f73 100644 --- a/cmd/restic/cmd_rewrite.go +++ b/cmd/restic/cmd_rewrite.go @@ -24,14 +24,12 @@ func newRewriteCommand(globalOptions *global.Options) *cobra.Command { cmd := &cobra.Command{ Use: "rewrite [flags] [snapshotID ...]", - Short: "Rewrite snapshots to exclude unwanted files", + Short: "Rewrite snapshots to exclude files or change metadata", Long: ` -The "rewrite" command excludes files from existing snapshots. It creates new -snapshots containing the same data as the original ones, but without the files -you specify to exclude. All metadata (time, host, tags) will be preserved. - -Alternatively you can use one of the --include variants to only include files -in the new snapshot which you want to preserve. +The "rewrite" command creates new snapshots from existing ones. You can use +exclude or include filters to control which files are included in the new +snapshots. Unless --new-host or --new-time is specified, metadata (time, host, +tags) is preserved. The snapshots to rewrite are specified using the --host, --tag and --path options, or by providing a list of snapshot IDs. Please note that specifying neither any of