btrfs-progs: Documentaion: rename to .asciidoc
[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 -v::
33 verbose.
34
35 -i::
36 ignore errors.
37
38 -o::
39 overwrite directories/files in <path>.
40
41 -t <bytenr>::
42 use <bytenr> to read root tree.
43
44 -f <bytenr>::
45 only restore files that are under specified root whose root bytenr is <bytenr>.
46
47 -u <mirror>::
48 use given superblock mirror identified by <mirror>, it can be 0,1,2.
49
50 -r <rootid>::
51 only restore files that are under specified root whose objectid is <rootid>.
52
53 -d::
54 find dir.
55
56 -l::
57 list tree roots.
58
59 -D|--dry-run::
60 dry run (only list files that would be recovered).
61
62 --path-regex <regex>::
63 restore only filenames matching regex, you have to use following syntax (possibly quoted):
64 +
65 +^/(|home(|/username(|/Desktop(|/.*))))$+
66
67 -c::
68 ignore case (--path-regrex only).
69
70 EXIT STATUS
71 -----------
72 *btrfs restore* returns a zero exit status if it succeeds. Non zero is
73 returned in case of failure.
74
75 AVAILABILITY
76 ------------
77 *btrfs* is part of btrfs-progs.
78 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
79 further details.
80
81 SEE ALSO
82 --------
83 `mkfs.btrfs`(8),
84 `btrfs-rescue`(8),
85 `btrfs-check`(8)