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_find.go b/cmd/restic/cmd_find.go index 851407292..6f7a6396a 100644 --- a/cmd/restic/cmd_find.go +++ b/cmd/restic/cmd_find.go @@ -33,16 +33,11 @@ func newFindCommand(globalOptions *global.Options) *cobra.Command { Short: "Find a file, a directory or restic IDs", Long: ` The "find" command searches for files or directories in snapshots stored in the -repo. -It can also be used to search for restic blobs or trees for troubleshooting. +repository. It can also be used to search for restic blobs, trees or pack +files for troubleshooting. + The default sort option for the snapshots is youngest to oldest. To sort the -output from oldest to youngest specify --reverse.`, - Example: `restic find config.json -restic find --json "*.yml" "*.json" -restic find --json --blob 420f620f b46ebe8a ddd38656 -restic find --show-pack-id --blob 420f620f -restic find --tree 577c2bc9 f81f2e22 a62827a9 -restic find --pack 025c1d06 +output from oldest to youngest specify --reverse. EXIT STATUS =========== @@ -53,6 +48,12 @@ Exit status is 10 if the repository does not exist. Exit status is 11 if the repository is already locked. Exit status is 12 if the password is incorrect. `, + Example: `restic find config.json +restic find --json "*.yml" "*.json" +restic find --json --blob 420f620f b46ebe8a ddd38656 +restic find --show-pack-id --blob 420f620f +restic find --tree 577c2bc9 f81f2e22 a62827a9 +restic find --pack 025c1d06`, GroupID: cmdGroupDefault, DisableAutoGenTag: true, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/restic/cmd_key_add.go b/cmd/restic/cmd_key_add.go index 5df3819ac..f83a048ab 100644 --- a/cmd/restic/cmd_key_add.go +++ b/cmd/restic/cmd_key_add.go @@ -20,7 +20,7 @@ func newKeyAddCommand(globalOptions *global.Options) *cobra.Command { Use: "add", Short: "Add a new key (password) to the repository; returns the new key ID", Long: ` -The "add" sub-command creates a new key and validates the key. Returns the new key ID. +The "key add" command creates a new key and validates the key. Returns the new key ID. EXIT STATUS =========== diff --git a/cmd/restic/cmd_key_list.go b/cmd/restic/cmd_key_list.go index 73527ae48..a7828b44f 100644 --- a/cmd/restic/cmd_key_list.go +++ b/cmd/restic/cmd_key_list.go @@ -20,7 +20,7 @@ func newKeyListCommand(globalOptions *global.Options) *cobra.Command { Use: "list", Short: "List keys (passwords)", Long: ` -The "list" sub-command lists all the keys (passwords) associated with the repository. +The "key list" command lists all the keys (passwords) associated with the repository. Returns the key ID, username, hostname, created time and if it's the current key being used to access the repository. diff --git a/cmd/restic/cmd_key_passwd.go b/cmd/restic/cmd_key_passwd.go index c45ac96ed..2f4a9507f 100644 --- a/cmd/restic/cmd_key_passwd.go +++ b/cmd/restic/cmd_key_passwd.go @@ -20,8 +20,8 @@ func newKeyPasswdCommand(globalOptions *global.Options) *cobra.Command { Use: "passwd", Short: "Change key (password); creates a new key ID and removes the old key ID, returns new key ID", Long: ` -The "passwd" sub-command creates a new key, validates the key and remove the old key ID. -Returns the new key ID. +The "key passwd" command creates a new key, validates the key and removes the old key ID. +Returns the new key ID. EXIT STATUS =========== diff --git a/cmd/restic/cmd_key_remove.go b/cmd/restic/cmd_key_remove.go index 90ab6b7fe..2d85c0122 100644 --- a/cmd/restic/cmd_key_remove.go +++ b/cmd/restic/cmd_key_remove.go @@ -16,10 +16,10 @@ import ( func newKeyRemoveCommand(globalOptions *global.Options) *cobra.Command { cmd := &cobra.Command{ Use: "remove [ID]", - Short: "Remove key ID (password) from the repository.", + Short: "Remove key ID (password) from the repository", Long: ` -The "remove" sub-command removes the selected key ID. The "remove" command does not allow -removing the current key being used to access the repository. +The "key remove" command removes the selected key ID. It does not allow removing the +current key being used to access the repository. EXIT STATUS =========== 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 diff --git a/cmd/restic/cmd_self_update.go b/cmd/restic/cmd_self_update.go index 5b684b22e..387c9b1d7 100644 --- a/cmd/restic/cmd_self_update.go +++ b/cmd/restic/cmd_self_update.go @@ -28,7 +28,7 @@ func newSelfUpdateCommand(globalOptions *global.Options) *cobra.Command { Use: "self-update [flags]", Short: "Update the restic binary", Long: ` -The command "self-update" downloads the latest stable release of restic from +The "self-update" command downloads the latest stable release of restic from GitHub and replaces the currently running binary. After download, the authenticity of the binary is verified using the GPG signature on the release files. @@ -38,9 +38,6 @@ EXIT STATUS Exit status is 0 if the command was successful. Exit status is 1 if there was any error. -Exit status is 10 if the repository does not exist. -Exit status is 11 if the repository is already locked. -Exit status is 12 if the password is incorrect. `, DisableAutoGenTag: true, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/restic/cmd_tag.go b/cmd/restic/cmd_tag.go index 65df7c292..6b1503f96 100644 --- a/cmd/restic/cmd_tag.go +++ b/cmd/restic/cmd_tag.go @@ -22,7 +22,7 @@ func newTagCommand(globalOptions *global.Options) *cobra.Command { Use: "tag [flags] [snapshotID ...]", Short: "Modify tags on snapshots", Long: ` -The "tag" command allows you to modify tags on exiting snapshots. +The "tag" command allows you to modify tags on existing snapshots. You can either set/replace the entire set of tags on a snapshot, or add tags to/remove tags from the existing set. diff --git a/doc/manual_rest.rst b/doc/manual_rest.rst index 18c782769..71eefe01c 100644 --- a/doc/manual_rest.rst +++ b/doc/manual_rest.rst @@ -25,7 +25,7 @@ Usage help is available: check Check the repository for errors copy Copy snapshots from one repository to another diff Show differences between two snapshots - dump Print a backed-up file to stdout + dump Print backed-up files or folders to stdout find Find a file, a directory or restic IDs forget Remove snapshots from the repository init Initialize a new repository @@ -38,7 +38,7 @@ Usage help is available: recover Recover data from the repository not referenced by snapshots repair Repair the repository restore Extract the data from a snapshot - rewrite Rewrite snapshots to exclude unwanted files + rewrite Rewrite snapshots to exclude files or change metadata snapshots List all snapshots stats Scan the repository and show basic statistics tag Modify tags on snapshots