Debian Codegraph @

upstream/debian-trixie/man8/btrfs.8

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .
4 .nr rst2man-indent-level 0
5 .
6 .de1 rstReportMargin
7 \\$1 \\n[an-margin]
8 level \\n[rst2man-indent-level]
9 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
10 -
11 \\n[rst2man-indent0]
12 \\n[rst2man-indent1]
13 \\n[rst2man-indent2]
14 ..
15 .de1 INDENT
16 .\" .rstReportMargin pre:
17 . RS \\$1
18 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
19 . nr rst2man-indent-level +1
20 .\" .rstReportMargin post:
21 ..
22 .de UNINDENT
23 . RE
24 .\" indent \\n[an-margin]
25 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
26 .nr rst2man-indent-level -1
27 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
29 ..
30 .TH "BTRFS" "8" "May 18, 2026" "7.0" "BTRFS"
31 .SH NAME
32 btrfs \- a toolbox to manage btrfs filesystems
33 .SH SYNOPSIS
34 .sp
35 \fBbtrfs\fP [global options] <group> [<group>...] <command> [options] [<args>]
36 .SH DESCRIPTION
37 .sp
38 The \fBbtrfs\fP utility is a toolbox for managing btrfs filesystems. There are
39 command groups to work with subvolumes, devices, for whole filesystem or other
40 specific actions. See section \fI\%COMMANDS\fP\&.
41 .sp
42 There are also standalone tools for some tasks like \fI\%btrfs\-convert(8)\fP or
43 \fI\%btrfstune(8)\fP that were separate historically and/or haven\(aqt been merged to the
44 main utility. See section \fI\%STANDALONE TOOLS\fP
45 for more details.
46 .sp
47 For other topics (mount options, etc) please refer to the separate manual
48 page \fI\%btrfs(5)\fP\&.
49 .SH COMMAND SYNTAX
50 .sp
51 Any command name can be shortened so long as the shortened form is unambiguous,
52 however, it is recommended to use full command names in scripts. All command
53 groups have their manual page named \fBbtrfs\-<group>\fP\&.
54 .sp
55 For example: it is possible to run \fBbtrfs sub snaps\fP instead of
56 \fBbtrfs subvolume snapshot\fP\&.
57 But \fBbtrfs file s\fP is not allowed, because \fBfile s\fP may be interpreted
58 both as \fBfilesystem show\fP and as \fBfilesystem sync\fP\&.
59 .sp
60 If the command name is ambiguous, the list of conflicting options is
61 printed.
62 .sp
63 \fISizes\fP, both upon input and output, can be expressed in either SI or IEC\-I
64 units (see \X'tty: link https://man7.org/linux/man-pages/man1/numfmt.1.html'\fI\%numfmt(1)\fP\X'tty: link')
65 with the suffix \fIB\fP appended.
66 All numbers will be formatted according to the rules of the \fIC\fP locale
67 (ignoring the shell locale, see \X'tty: link https://man7.org/linux/man-pages/man7/locale.7.html'\fI\%locale(7)\fP\X'tty: link').
68 .sp
69 For an overview of a given command use \fBbtrfs command \-\-help\fP
70 or \fBbtrfs [command...] help \-\-full\fP to print all available options
71 for all commands.
72 .sp
73 There are global options that are passed between \fIbtrfs\fP and the \fIgroup\fP name
74 and affect behaviour not specific to the command, e.g. verbosity or the type
75 of the output:
76 .INDENT 0.0
77 .INDENT 3.5
78 .sp
79 .EX
80 btrfs \-q subvolume create ...
81 btrfs \-\-dry\-run subvolume create ...
82 .EE
83 .UNINDENT
84 .UNINDENT
85 .INDENT 0.0
86 .TP
87 .BI \-\-format \ <format>
88 if supported by the command, print subcommand output in that format (text, json)
89 .UNINDENT
90 .INDENT 0.0
91 .TP
92 .B \-v|\-\-verbose
93 increase verbosity of the subcommand
94 .TP
95 .B \-q|\-\-quiet
96 print only errors
97 .UNINDENT
98 .INDENT 0.0
99 .TP
100 .BI \-\-log \ <level>
101 set log level (default, info, verbose, debug, quiet)
102 .UNINDENT
103 .sp
104 The remaining options are relevant only for the main tool:
105 .INDENT 0.0
106 .TP
107 .B \-\-help
108 print condensed help for all subcommands
109 .TP
110 .B \-\-version
111 print version string
112 .UNINDENT
113 .SH COMMANDS
114 .INDENT 0.0
115 .TP
116 .B balance
117 Balance btrfs filesystem chunks across single or several devices.
118 See \fI\%btrfs\-balance(8)\fP for details.
119 .TP
120 .B check
121 Do off\-line check on a btrfs filesystem.
122 See \fI\%btrfs\-check(8)\fP for details.
123 .TP
124 .B device
125 Manage devices managed by btrfs, including add/delete/scan and so
126 on. See \fI\%btrfs\-device(8)\fP for details.
127 .TP
128 .B filesystem
129 Manage a btrfs filesystem, including label setting/sync and so on.
130 See \fI\%btrfs\-filesystem(8)\fP for details.
131 .TP
132 .B inspect\-internal
133 Debug tools for developers/hackers.
134 See \fI\%btrfs\-inspect\-internal(8)\fP for details.
135 .TP
136 .B property
137 Get/set a property from/to a btrfs object.
138 See \fI\%btrfs\-property(8)\fP for details.
139 .TP
140 .B qgroup
141 Manage quota group(qgroup) for btrfs filesystem.
142 See \fI\%btrfs\-qgroup(8)\fP for details.
143 .TP
144 .B quota
145 Manage quota on btrfs filesystem like enabling/rescan and etc.
146 See \fI\%btrfs\-quota(8)\fP and \fI\%btrfs\-qgroup(8)\fP for details.
147 .TP
148 .B receive
149 Receive subvolume data from stdin/file for restore and etc.
150 See \fI\%btrfs\-receive(8)\fP for details.
151 .TP
152 .B replace
153 Replace btrfs devices.
154 See \fI\%btrfs\-replace(8)\fP for details.
155 .TP
156 .B rescue
157 Try to rescue damaged btrfs filesystem.
158 See \fI\%btrfs\-rescue(8)\fP for details.
159 .TP
160 .B restore
161 Try to restore files from a damaged btrfs filesystem.
162 See \fI\%btrfs\-restore(8)\fP for details.
163 .TP
164 .B scrub
165 Scrub a btrfs filesystem.
166 See \fI\%btrfs\-scrub(8)\fP for details.
167 .TP
168 .B send
169 Send subvolume data to stdout/file for backup and etc.
170 See \fI\%btrfs\-send(8)\fP for details.
171 .TP
172 .B subvolume
173 Create/delete/list/manage btrfs subvolume.
174 See \fI\%btrfs\-subvolume(8)\fP for details.
175 .UNINDENT
176 .SH STANDALONE TOOLS
177 .sp
178 New functionality could be provided using a standalone tool. If the functionality
179 proves to be useful, then the standalone tool is declared obsolete and its
180 functionality is copied to the main tool. Obsolete tools are removed after a
181 long (years) depreciation period.
182 .sp
183 Tools that are still in active use without an equivalent in \fBbtrfs\fP:
184 .INDENT 0.0
185 .TP
186 .B btrfs\-convert
187 in\-place conversion from ext2/3/4 filesystems to btrfs
188 .TP
189 .B btrfstune
190 tweak some filesystem properties on a unmounted filesystem
191 .TP
192 .B btrfs\-select\-super
193 rescue tool to overwrite primary superblock from a spare copy
194 .TP
195 .B btrfs\-find\-root
196 rescue helper to find tree roots in a filesystem
197 .UNINDENT
198 .sp
199 For space\-constrained environments, it\(aqs possible to build a single binary with
200 functionality of several standalone tools. This is following the concept of
201 busybox where the file name selects the functionality. This works for symlinks
202 or hardlinks. The full list can be obtained by \fBbtrfs help \-\-box\fP\&.
203 .SH EXIT STATUS
204 .sp
205 \fBbtrfs\fP returns a zero exit status if it succeeds. Non zero is returned in
206 case of failure.
207 .SH AVAILABILITY
208 .sp
209 \fBbtrfs\fP is part of btrfs\-progs. Please refer to the documentation at
210 \X'tty: link https://btrfs.readthedocs.io'\fI\%https://btrfs.readthedocs.io\fP\X'tty: link'\&.
211 .SH SEE ALSO
212 .sp
213 \fI\%btrfs(5)\fP,
214 \fI\%btrfs\-balance(8)\fP,
215 \fI\%btrfs\-check(8)\fP,
216 \fI\%btrfs\-convert(8)\fP,
217 \fI\%btrfs\-device(8)\fP,
218 \fI\%btrfs\-filesystem(8)\fP,
219 \fI\%btrfs\-inspect\-internal(8)\fP,
220 \fI\%btrfs\-property(8)\fP,
221 \fI\%btrfs\-qgroup(8)\fP,
222 \fI\%btrfs\-quota(8)\fP,
223 \fI\%btrfs\-receive(8)\fP,
224 \fI\%btrfs\-replace(8)\fP,
225 \fI\%btrfs\-rescue(8)\fP,
226 \fI\%btrfs\-restore(8)\fP,
227 \fI\%btrfs\-scrub(8)\fP,
228 \fI\%btrfs\-send(8)\fP,
229 \fI\%btrfs\-subvolume(8)\fP,
230 \fI\%btrfstune(8)\fP,
231 \fI\%mkfs.btrfs(8)\fP
232 .\" Generated by docutils manpage writer.
233 .