btrfs-progs: fix typos in restore help/doc
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-restore.asciidoc
1 btrfs-restore(8)
2 ================
3
4 NAME
5 ----
6 btrfs-restore - try to restore files from a damaged btrfs filesystem(unmounted)
7
8 SYNOPSIS
9 --------
10 *btrfs restore* [options] <device> <path> | -l <device>
11
12 DESCRIPTION
13 -----------
14 *btrfs restore* is used to try to salvage files from a damaged filesystem and
15 restore them into <path> or just list the tree roots.
16
17 Since current `btrfs-check`(8) or `btrfs-rescue`(8) only has very limited usage,
18 *btrfs restore* is normally a better choice.
19
20 NOTE: It is recommended to read the following btrfs wiki page if your data is
21 not salvaged with default option: +
22 https://btrfs.wiki.kernel.org/index.php/Restore
23
24 OPTIONS
25 -------
26 -s::
27 get snapshots, btrfs restore skips snapshots in default.
28
29 -x::
30 get extended attributes.
31
32 -m|--metadata::
33 restore owner, mode and times.
34
35 -v::
36 verbose.
37
38 -i::
39 ignore errors.
40
41 -o::
42 overwrite directories/files in <path>.
43
44 -t <bytenr>::
45 use <bytenr> to read root tree.
46
47 -f <bytenr>::
48 only restore files that are under specified root whose root bytenr is <bytenr>.
49
50 -u <mirror>::
51 use given superblock mirror identified by <mirror>, it can be 0,1,2.
52
53 -r <rootid>::
54 only restore files that are under specified root whose objectid is <rootid>.
55
56 -d::
57 find dir.
58
59 -l::
60 list tree roots.
61
62 -D|--dry-run::
63 dry run (only list files that would be recovered).
64
65 --path-regex <regex>::
66 restore only filenames matching regex, you have to use following syntax (possibly quoted):
67 +
68 +^/(|home(|/username(|/Desktop(|/.*))))$+
69
70 -c::
71 ignore case (--path-regex only).
72
73 EXIT STATUS
74 -----------
75 *btrfs restore* returns a zero exit status if it succeeds. Non zero is
76 returned in case of failure.
77
78 AVAILABILITY
79 ------------
80 *btrfs* is part of btrfs-progs.
81 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
82 further details.
83
84 SEE ALSO
85 --------
86 `mkfs.btrfs`(8),
87 `btrfs-rescue`(8),
88 `btrfs-check`(8)