72aa0847d2846ff14cebecdc281a0c163074f3c3
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-restore.txt
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 `btrfsck`(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.
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 <location>::
42 use <location> to read root tree.
43
44 -f <offset>::
45 use <offset> to read fs tree.
46
47 -u <block>::
48 use given superblock mirror identified by <block>.
49
50 -r <rootid>::
51 use <rootid> as root objectid.
52
53 -d::
54 find dir.
55
56 -l::
57 list tree roots.
58
59 EXIT STATUS
60 -----------
61 'btrfs restore' returns a zero exist status if it succeeds. Non zero is
62 returned in case of failure.
63
64 AVAILABILITY
65 ------------
66 'btrfs' is part of btrfs-progs. Btrfs filesystem is currently under heavy
67 development,
68 and not suitable for any uses other than benchmarking and review.
69 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
70 further details.
71
72 SEE ALSO
73 --------
74 `mkfs.btrfs`(8),
75 `btrfs-rescue`(8),
76 `btrfs-check`(8)