1BTRFS(8) BTRFS BTRFS(8)
2
3
4
6 btrfs - a toolbox to manage btrfs filesystems
7
9 btrfs <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 or
17 btrfstune that were separate historically and/or haven't been merged to
18 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
45 balance
46 Balance btrfs filesystem chunks across single or several de‐
47 vices. See btrfs-balance(8) for details.
48
49 check Do off-line check on a btrfs filesystem. See btrfs-check(8) for
50 details.
51
52 device Manage devices managed by btrfs, including add/delete/scan and
53 so on. See btrfs-device(8) for details.
54
55 filesystem
56 Manage a btrfs filesystem, including label setting/sync and so
57 on. See btrfs-filesystem(8) for details.
58
59 inspect-internal
60 Debug tools for developers/hackers. See
61 btrfs-inspect-internal(8) for details.
62
63 property
64 Get/set a property from/to a btrfs object. See
65 btrfs-property(8) for details.
66
67 qgroup Manage quota group(qgroup) for btrfs filesystem. See
68 btrfs-qgroup(8) for details.
69
70 quota Manage quota on btrfs filesystem like enabling/rescan and etc.
71 See btrfs-quota(8) and btrfs-qgroup(8) for details.
72
73 receive
74 Receive subvolume data from stdin/file for restore and etc. See
75 btrfs-receive(8) for details.
76
77 replace
78 Replace btrfs devices. See btrfs-replace(8) for details.
79
80 rescue Try to rescue damaged btrfs filesystem. See btrfs-rescue(8) for
81 details.
82
83 restore
84 Try to restore files from a damaged btrfs filesystem. See
85 btrfs-restore(8) for details.
86
87 scrub Scrub a btrfs filesystem. See btrfs-scrub(8) for details.
88
89 send Send subvolume data to stdout/file for backup and etc. See
90 btrfs-send(8) for details.
91
92 subvolume
93 Create/delete/list/manage btrfs subvolume. See
94 btrfs-subvolume(8) for details.
95
97 New functionality could be provided using a standalone tool. If the
98 functionality proves to be useful, then the standalone tool is declared
99 obsolete and its functionality is copied to the main tool. Obsolete
100 tools are removed after a long (years) depreciation period.
101
102 Tools that are still in active use without an equivalent in btrfs:
103
104 btrfs-convert
105 in-place conversion from ext2/3/4 filesystems to btrfs
106
107 btrfstune
108 tweak some filesystem properties on a unmounted filesystem
109
110 btrfs-select-super
111 rescue tool to overwrite primary superblock from a spare copy
112
113 btrfs-find-root
114 rescue helper to find tree roots in a filesystem
115
116 Deprecated and obsolete tools:
117
118 btrfs-debug-tree
119 moved to btrfs inspect-internal dump-tree. Removed from source
120 distribution.
121
122 btrfs-show-super
123 moved to btrfs inspect-internal dump-super, standalone removed.
124
125 btrfs-zero-log
126 moved to btrfs rescue zero-log, standalone removed.
127
128 For space-constrained environments, it's possible to build a single bi‐
129 nary with functionality of several standalone tools. This is following
130 the concept of busybox where the file name selects the functionality.
131 This works for symlinks or hardlinks. The full list can be obtained by
132 btrfs help --box.
133
135 btrfs returns a zero exit status if it succeeds. Non zero is returned
136 in case of failure.
137
139 btrfs is part of btrfs-progs. Please refer to the documentation at
140 https://btrfs.readthedocs.io or wiki http://btrfs.wiki.kernel.org for
141 further information.
142
144 btrfs(5), btrfs-balance(8), btrfs-check(8), btrfs-convert(8),
145 btrfs-device(8), btrfs-filesystem(8), btrfs-inspect-internal(8),
146 btrfs-property(8), btrfs-qgroup(8), btrfs-quota(8), btrfs-receive(8),
147 btrfs-replace(8), btrfs-rescue(8), btrfs-restore(8), btrfs-scrub(8),
148 btrfs-send(8), btrfs-subvolume(8), btrfstune(8), mkfs.btrfs(8)
149
150
151
152
1536.1.3 Jan 25, 2023 BTRFS(8)