1BTRFS(8) BTRFS BTRFS(8)
2
3
4
6 btrfs - a toolbox to manage btrfs filesystems
7
9 btrfs [global] <group> [<group>...] <command> [<args>]
10
12 The btrfs utility is a toolbox for managing btrfs filesystems. There
13 are command groups to work with subvolumes, devices, for whole filesys‐
14 tem or other specific actions. See section COMMANDS.
15
16 There are also standalone tools for some tasks like btrfs-convert(8) or
17 btrfstune(8) that were separate historically and/or haven't been merged
18 to the main utility. See section STANDALONE TOOLS for more details.
19
20 For other topics (mount options, etc) please refer to the separate man‐
21 ual page btrfs(5).
22
24 Any command name can be shortened so long as the shortened form is un‐
25 ambiguous, however, it is recommended to use full command names in
26 scripts. All command groups have their manual page named
27 btrfs-<group>.
28
29 For example: it is possible to run btrfs sub snaps instead of btrfs
30 subvolume snapshot. But btrfs file s is not allowed, because file s
31 may be interpreted both as filesystem show and as filesystem sync.
32
33 If the command name is ambiguous, the list of conflicting options is
34 printed.
35
36 Sizes, both upon input and output, can be expressed in either SI or
37 IEC-I units (see numfmt(1)) with the suffix B appended. All numbers
38 will be formatted according to the rules of the C locale (ignoring the
39 shell locale, see locale(7)).
40
41 For an overview of a given command use btrfs command --help or btrfs
42 [command...] --help --full to print all available options.
43
44 There are global options that are passed between btrfs and the group
45 name and affect behaviour not specific to the command, e.g. verbosity
46 or the type of the output.
47
48 --format <format>
49 if supported by the command, print subcommand output in that
50 format (text, json)
51
52 -v|--verbose
53 increase verbosity of the subcommand
54
55 -q|--quiet
56 print only errors
57
58 --log <level>
59 set log level (default, info, verbose, debug, quiet)
60
61 The remaining options are relevant only for the main tool:
62
63 --help print condensed help for all subcommands
64
65 --version
66 print version string
67
69 balance
70 Balance btrfs filesystem chunks across single or several de‐
71 vices. See btrfs-balance(8) for details.
72
73 check Do off-line check on a btrfs filesystem. See btrfs-check(8) for
74 details.
75
76 device Manage devices managed by btrfs, including add/delete/scan and
77 so on. See btrfs-device(8) for details.
78
79 filesystem
80 Manage a btrfs filesystem, including label setting/sync and so
81 on. See btrfs-filesystem(8) for details.
82
83 inspect-internal
84 Debug tools for developers/hackers. See
85 btrfs-inspect-internal(8) for details.
86
87 property
88 Get/set a property from/to a btrfs object. See
89 btrfs-property(8) for details.
90
91 qgroup Manage quota group(qgroup) for btrfs filesystem. See
92 btrfs-qgroup(8) for details.
93
94 quota Manage quota on btrfs filesystem like enabling/rescan and etc.
95 See btrfs-quota(8) and btrfs-qgroup(8) for details.
96
97 receive
98 Receive subvolume data from stdin/file for restore and etc. See
99 btrfs-receive(8) for details.
100
101 replace
102 Replace btrfs devices. See btrfs-replace(8) for details.
103
104 rescue Try to rescue damaged btrfs filesystem. See btrfs-rescue(8) for
105 details.
106
107 restore
108 Try to restore files from a damaged btrfs filesystem. See
109 btrfs-restore(8) for details.
110
111 scrub Scrub a btrfs filesystem. See btrfs-scrub(8) for details.
112
113 send Send subvolume data to stdout/file for backup and etc. See
114 btrfs-send(8) for details.
115
116 subvolume
117 Create/delete/list/manage btrfs subvolume. See
118 btrfs-subvolume(8) for details.
119
121 New functionality could be provided using a standalone tool. If the
122 functionality proves to be useful, then the standalone tool is declared
123 obsolete and its functionality is copied to the main tool. Obsolete
124 tools are removed after a long (years) depreciation period.
125
126 Tools that are still in active use without an equivalent in btrfs:
127
128 btrfs-convert
129 in-place conversion from ext2/3/4 filesystems to btrfs
130
131 btrfstune
132 tweak some filesystem properties on a unmounted filesystem
133
134 btrfs-select-super
135 rescue tool to overwrite primary superblock from a spare copy
136
137 btrfs-find-root
138 rescue helper to find tree roots in a filesystem
139
140 For space-constrained environments, it's possible to build a single bi‐
141 nary with functionality of several standalone tools. This is following
142 the concept of busybox where the file name selects the functionality.
143 This works for symlinks or hardlinks. The full list can be obtained by
144 btrfs help --box.
145
147 btrfs returns a zero exit status if it succeeds. Non zero is returned
148 in case of failure.
149
151 btrfs is part of btrfs-progs. Please refer to the documentation at
152 https://btrfs.readthedocs.io.
153
155 btrfs(5), btrfs-balance(8), btrfs-check(8), btrfs-convert(8),
156 btrfs-device(8), btrfs-filesystem(8), btrfs-inspect-internal(8),
157 btrfs-property(8), btrfs-qgroup(8), btrfs-quota(8), btrfs-receive(8),
158 btrfs-replace(8), btrfs-rescue(8), btrfs-restore(8), btrfs-scrub(8),
159 btrfs-send(8), btrfs-subvolume(8), btrfstune(8), mkfs.btrfs(8)
160
161
162
163
1646.6.2 Nov 24, 2023 BTRFS(8)