1
0
mirror of https://github.com/kdave/btrfs-progs synced 2025-03-31 23:57:26 +00:00

btrfs-progs: restore: add more long option variants

Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2015-04-29 18:26:08 +02:00
parent 18b48340de
commit bea9ba0acb
2 changed files with 26 additions and 18 deletions

View File

@ -3,7 +3,7 @@ btrfs-restore(8)
NAME NAME
---- ----
btrfs-restore - try to restore files from a damaged btrfs filesystem(unmounted) btrfs-restore - try to restore files from a damaged btrfs filesystem image
SYNOPSIS SYNOPSIS
-------- --------
@ -23,10 +23,10 @@ https://btrfs.wiki.kernel.org/index.php/Restore
OPTIONS OPTIONS
------- -------
-s:: -s|--snapshots::
get snapshots, btrfs restore skips snapshots in default. get snapshots, btrfs restore skips snapshots in default.
-x:: -x|--xattr::
get extended attributes. get extended attributes.
-m|--metadata:: -m|--metadata::
@ -35,13 +35,13 @@ restore owner, mode and times.
-S|--symlinks:: -S|--symlinks::
restore symbolic links as well as normal files. restore symbolic links as well as normal files.
-v:: -v|--verbose::
verbose. verbose.
-i:: -i|--ignore-errors::
ignore errors. ignore errors.
-o:: -o|--overwrite::
overwrite directories/files in <path>. overwrite directories/files in <path>.
-t <bytenr>:: -t <bytenr>::
@ -50,16 +50,16 @@ use <bytenr> to read root tree.
-f <bytenr>:: -f <bytenr>::
only restore files that are under specified root whose root bytenr is <bytenr>. only restore files that are under specified root whose root bytenr is <bytenr>.
-u <mirror>:: -u|--super <mirror>::
use given superblock mirror identified by <mirror>, it can be 0,1,2. use given superblock mirror identified by <mirror>, it can be 0,1,2.
-r <rootid>:: -r|--root <rootid>::
only restore files that are under specified root whose objectid is <rootid>. only restore files that are under specified root whose objectid is <rootid>.
-d:: -d::
find dir. find dir.
-l:: -l|--list-roots::
list tree roots. list tree roots.
-D|--dry-run:: -D|--dry-run::

View File

@ -1386,19 +1386,19 @@ const char * const cmd_restore_usage[] = {
"btrfs restore [options] <device> <path> | -l <device>", "btrfs restore [options] <device> <path> | -l <device>",
"Try to restore files from a damaged filesystem (unmounted)", "Try to restore files from a damaged filesystem (unmounted)",
"", "",
"-s get snapshots", "-s|--snapshots get snapshots",
"-x get extended attributes", "-x|--xattr get extended attributes",
"-m|--metadata restore owner, mode and times", "-m|--metadata restore owner, mode and times",
"-S|--symlinks restore symbolic links" "-S|--symlinks restore symbolic links",
"-v verbose", "-v|--verbose verbose",
"-i ignore errors", "-i|--ignore-errors ignore errors",
"-o overwrite", "-o|--overwrite overwrite",
"-t <bytenr> tree location", "-t <bytenr> tree location",
"-f <bytenr> filesystem location", "-f <bytenr> filesystem location",
"-u <mirror> super mirror", "-u|--super <mirror> super mirror",
"-r <rootid> root objectid", "-r|--root <rootid> root objectid",
"-d find dir", "-d find dir",
"-l list tree roots", "-l|--list-roots list tree roots",
"-D|--dry-run dry run (only list files that would be recovered)", "-D|--dry-run dry run (only list files that would be recovered)",
"--path-regex <regex>", "--path-regex <regex>",
" restore only filenames matching regex,", " restore only filenames matching regex,",
@ -1433,6 +1433,14 @@ int cmd_restore(int argc, char **argv)
{ "dry-run", no_argument, NULL, 'D'}, { "dry-run", no_argument, NULL, 'D'},
{ "metadata", no_argument, NULL, 'm'}, { "metadata", no_argument, NULL, 'm'},
{ "symlinks", no_argument, NULL, 'S'}, { "symlinks", no_argument, NULL, 'S'},
{ "snapshots", no_argument, NULL, 's'},
{ "xattr", no_argument, NULL, 'x'},
{ "verbose", no_argument, NULL, 'v'},
{ "ignore-errors", no_argument, NULL, 'i'},
{ "overwrite", no_argument, NULL, 'o'},
{ "super", required_argument, NULL, 'u'},
{ "root", required_argument, NULL, 'r'},
{ "list-roots", no_argument, NULL, 'l'},
{ NULL, 0, NULL, 0} { NULL, 0, NULL, 0}
}; };