diff mbox

[6/6] Btrfs-progs: btrfs-restore, document updates

Message ID 1403141229-25565-6-git-send-email-wangsl.fnst@cn.fujitsu.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Wang Shilong June 19, 2014, 1:27 a.m. UTC
Add some missing options, also improve some confusing
expressions.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
---
 Documentation/btrfs-restore.txt | 26 ++++++++++++++++++--------
 cmds-restore.c                  |  7 ++++---
 2 files changed, 22 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/Documentation/btrfs-restore.txt b/Documentation/btrfs-restore.txt
index d774343..85b0797 100644
--- a/Documentation/btrfs-restore.txt
+++ b/Documentation/btrfs-restore.txt
@@ -24,7 +24,7 @@  https://btrfs.wiki.kernel.org/index.php/Restore
 OPTIONS
 -------
 -s::
-get snapshots.
+get snapshots, btrfs restore skips snapshots in default.
 
 -x::
 get extended attributes.
@@ -38,17 +38,17 @@  ignore errors.
 -o::
 overwrite directories/files in <path>.
 
--t <location>::
-use <location> to read root tree.
+-t <bytenr>::
+use <bytenr> to read root tree.
 
--f <offset>::
-use <offset> to read fs tree.
+-f <bytenr>::
+only restore files that are under specified root whose root bytenr is <bytenr>.
 
--u <block>::
-use given superblock mirror identified by <block>.
+-u <mirror>::
+use given superblock mirror identified by <mirror>, it can be 0,1,2.
 
 -r <rootid>::
-use <rootid> as root objectid.
+only restore files that are under specified root whose objectid is <rootid>.
 
 -d::
 find dir.
@@ -56,6 +56,16 @@  find dir.
 -l::
 list tree roots.
 
+-D|--dry-run::
+dry run (only list files that would be recovered).
+
+--path-regex <regex>::
+restore only filenames matching regex, you have to use following syntax (possibly quoted):
+^/(|home(|/username(|/Desktop(|/.*))))$
+
+-c::
+ignore case(--path-regrex only).
+
 EXIT STATUS
 -----------
 *btrfs restore* returns a zero exist status if it succeeds. Non zero is
diff --git a/cmds-restore.c b/cmds-restore.c
index 3a29ed6..74f35a4 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -1111,9 +1111,9 @@  const char * const cmd_restore_usage[] = {
 	"-v              verbose",
 	"-i              ignore errors",
 	"-o              overwrite",
-	"-t <location>   tree location",
-	"-f <offset>     filesystem location",
-	"-u <block>      super mirror",
+	"-t <bytenr>     tree location",
+	"-f <bytenr>     filesystem location",
+	"-u <mirror>     super mirror",
 	"-r <rootid>     root objectid",
 	"-d              find dir",
 	"-l              list tree roots",
@@ -1122,6 +1122,7 @@  const char * const cmd_restore_usage[] = {
 	"                restore only filenames matching regex,",
 	"                you have to use following syntax (possibly quoted):",
 	"                ^/(|home(|/username(|/Desktop(|/.*))))$",
+	"-c              ignore case(--path-regrex only)",
 	NULL
 };