btrfs-progs: docs: update btrfs manual page
[platform/upstream/btrfs-progs.git] / Documentation / btrfs.asciidoc
1 btrfs(8)
2 ========
3
4 NAME
5 ----
6 btrfs - a toolbox to manage btrfs filesystems
7
8 SYNOPSIS
9 --------
10 *btrfs* <command> [<args>]
11
12 DESCRIPTION
13 -----------
14 The *btrfs* utility is a toolbox for managing btrfs filesystems.  There are
15 command groups to work with subvolumes, devices, for whole filesystem or other
16 specific actions. See section *COMMANDS*.
17
18 There are also standalone tools for some tasks like *btrfs-convert* or
19 *btrfstune* that were separate historically and/or haven't been merged to the
20 main utility. See section 'STANDALONE TOOLS' for more details.
21
22 COMMAND SYNTAX
23 --------------
24
25 Any command name can be shortened as far as it stays unambiguous,
26 however it is recommended to use full command names in scripts.
27 All command groups have their manual page named *btrfs-<group>*.
28
29 For example: it is possible to run *btrfs sub snaps* instead of
30 *btrfs subvolume snapshot*.
31 But *btrfs file s* is not allowed, because *file s* may be interpreted
32 both as *filesystem show* and as *filesystem sync*.
33
34 If the command name is ambiguous, the list of conflicting options is
35 printed.
36
37 For an overview of a given command use 'btrfs command --help'
38 or 'btrfs [command...] --help --full' to print all available options.
39
40 COMMANDS
41 --------
42 *balance*::
43         Balance btrfs filesystem chunks across single or several devices. +
44         See `btrfs-balance`(8) for details.
45
46 *check*::
47         Do off-line check on a btrfs filesystem. +
48         See `btrfs-check`(8) for details.
49
50 *device*::
51         Manage devices managed by btrfs, including add/delete/scan and so
52         on. +
53         See `btrfs-device`(8) for details.
54
55 *filesystem*::
56         Manage a btrfs filesystem, including label setting/sync and so on. +
57         See `btrfs-filesystem`(8) for details.
58
59 *inspect-internal*::
60         Debug tools for developers/hackers. +
61         See `btrfs-inspect-internal`(8) for details.
62
63 *property*::
64         Get/set a property from/to a btrfs object. +
65         See `btrfs-property`(8) for details.
66
67 *qgroup*::
68         Manage quota group(qgroup) for btrfs filesystem. +
69         See `btrfs-qgroup`(8) for details.
70
71 *quota*::
72         Manage quota on btrfs filesystem like enabling/rescan and etc. +
73         See `btrfs-quota`(8) and `btrfs-qgroup`(8) for details.
74
75 *receive*::
76         Receive subvolume data from stdin/file for restore and etc. +
77         See `btrfs-receive`(8) for details.
78
79 *replace*::
80         Replace btrfs devices. +
81         See `btrfs-replace`(8) for details.
82
83 *rescue*::
84         Try to rescue damaged btrfs filesystem. +
85         See `btrfs-rescue`(8) for details.
86
87 *restore*::
88         Try to restore files from a damaged btrfs filesystem. +
89         See `btrfs-restore`(8) for details.
90
91 *scrub*::
92         Scrub a btrfs filesystem. +
93         See `btrfs-scrub`(8) for details.
94
95 *send*::
96         Send subvolume data to stdout/file for backup and etc. +
97         See `btrfs-send`(8) for details.
98
99 *subvolume*::
100         Create/delete/list/manage btrfs subvolume. +
101         See `btrfs-subvolume`(8) for details.
102
103 STANDALONE TOOLS
104 ----------------
105
106 There are several standalone tools to provide certain functionality. If the
107 functionality proves to be useful, the standalone tools are declared obsolete
108 and their functionality copied to the main tool. The deprecation period is long
109 (years) and the obsolete binaries are still provided.
110
111 Tools that are still in active use without an equivalent in *btrfs*:
112
113 *btrfs-convert*:: in-place conversion from ext2/3/4 filesystems to btrfs
114 *btrfstune*:: tweak some filesystem properties on a unmounted filesystem
115 *btrfs-select-super*:: rescue tool to overwrite primary superblock from a spare copy
116 *btrfs-find-root*:: rescue helper to find tree roots in a filesystem
117
118 Deprecated and obsolete tools:
119
120 *btrfs-debug-tree*:: moved to *btrfs inspect-internal dump-tree*
121 *btrfs-show-super*:: moved to *btrfs inspect-internal dump-super*
122 *btrfs-zero-log*:: moved to *btrfs rescue zero-log*
123
124 EXIT STATUS
125 -----------
126 *btrfs* returns a zero exit status if it succeeds. Non zero is returned in
127 case of failure.
128
129 AVAILABILITY
130 ------------
131 *btrfs* is part of btrfs-progs.
132 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
133 further details.
134
135 SEE ALSO
136 --------
137 `btrfs-balance`(8),
138 `btrfs-check`(8),
139 `btrfs-convert`(8),
140 `btrfs-device`(8),
141 `btrfs-filesystem`(8),
142 `btrfs-inspect-internal`(8),
143 `btrfs-property`(8),
144 `btrfs-qgroup`(8),
145 `btrfs-quota`(8),
146 `btrfs-receive`(8),
147 `btrfs-replace`(8),
148 `btrfs-rescue`(8),
149 `btrfs-restore`(8),
150 `btrfs-scrub`(8),
151 `btrfs-send`(8),
152 `btrfs-subvolume`(8),
153 `btrfstune`(8),
154 `mkfs.btrfs`(8)