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