aboutsummaryrefslogtreecommitdiff
path: root/sbin/be/be.1
blob: 2dd7b3d9d633eac42aec3fac6d047f46b294d220 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
.\"
.\" be - Utility to manage Boot Environments on the ZFS filesystem
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\"
.\"     @(#)be.1
.\" $FreeBSD$
.\"
.Dd June 15, 2017
.Dt BE 1
.Os FreeBSD
.Sh NAME
.Nm be
.Nd Utility to manage Boot Environments on ZFS
.Sh SYNOPSIS
.Nm
activate
.Op Fl t
.Ao Ar beName Ac
.Nm
create
.Op Fl r
.Op Fl e Ar nonActiveBe | Fl e Ar beName@snapshot
.Ao Ar beName Ac
.Nm
create
.Op Fl r
.Ao Ar beName@snapshot Ac
.Nm
destroy
.Op Fl F
.Ao Ar beName | beName@snapshot Ac
.Nm
jail
.Ao Ar jailID | jailName Ac
.Ao Ar bootenv Ac
.Nm
list
.Op Fl a
.Op Fl D
.Op Fl H
.Op Fl s
.Nm
mount
.Ao Ar beName Ac
.Op mountpoint
.Nm
rename
.Ao Ar origBeName Ac
.Ao Ar newBeName Ac
.Nm
{ ujail | unjail }
.Ao Ar jailID | jailName Ac
.Ao Ar bootenv Ac
.Nm
{ umount | unmount }
.Op Fl f
.Ao Ar beName Ac
.Sh DESCRIPTION
The
.Nm
command is used to setup and interact with ZFS boot environments, which are bootable clones of datasets.
.Pp
.Em Boot Environments
allows the system to be upgraded, while preserving the old system environment in a separate ZFS dataset.
.Pp
.Sh COMMANDS
The following commands are supported by
.Nm :
.Bl -tag -width activate
.It Ic activate
.Op Fl t
.Ar <beName>
.Pp
Activate the given
.Ar beName
as the default boot filesystem. If the
.Op Fl t
flag is given, this takes effect only for the next boot.
.Pp
.It Ic create
.Op Fl r
.Op Fl e Ar nonActiveBe | Fl e Ar beName@snapshot
.Ao Ar beName Ac
.Pp
Creates a new boot environment named
.Ar beName .
If the -e param is specified, the new environment will be cloned from the given
.Ar nonActiveBe | Ar beName@snapshot .
If the
.Op Fl r
flag is given, a recursive boot environment will be made.
.Pp
.It Ic create
.Op Fl r
.Ao Ar beName@snapshot Ac
.Pp
Creates a snapshot of the existing boot environment named
.Ar beName .
If the
.Op Fl r
flag is given, a recursive boot environment will be made.
.Pp
.It Ic destroy
.Op Fl F
.Ao Ar beName | beName@snapshot Ac
.Pp
Destroys the given
.Ar beName
boot environment or
.Ar beName@snapshot
snapshot.
Specifying
.Fl F
will automatically unmount without confirmation.
.Pp
.It Ic jail
.Ao Ar jailID | jailName Ac
.Ao Ar bootenv Ac
.Pp
Creates a jail of the given boot environment.
.Pp
.It Ic list
.Op Fl a
.Op Fl D
.Op Fl H
.Op Fl s
.Pp
Displays all boot environments.
The Active field indicates whether the boot environment is active now (N); active on reboot (R); or both (NR).
.Pp
If
.Fl a
is used, display all datasets.
If
.Fl D
is used, display the full space usage for each boot environment, assuming all other boot environments were destroyed.
The
.Fl H
option is used for scripting. It does not print headers and separate fields by a single tab instead of arbitrary white space.
If
.Fl s
is used, display all snapshots as well.
.Pp
.It Ic mount
.Ao Ar beName Ac
.Op mountpoint
.Pp
Temporarily mount the boot environment.
Mount at the specified
.Ar mountpoint
if provided.
.Pp
.It Ic rename Ao Ar origBeName Ac Ao Ar newBeName Ac
.Pp
Renames the given nonactive
.Ar origBeName
to the given
.Ar newBeName
.Pp
.It Ic unmount
.Op Fl f
.Ao Ar beName Ac
.Pp
Unmount the given boot environment, if it is mounted.
Specifying
.Fl f
will force the unmount if busy.
.Pp
.It Ic unjail
.Ao Ar beName Ac
.Pp
Destroys the jail created from the given boot environment.
.Pp
.El
.Sh EXAMPLES
.Bl -bullet
.It
To fill in with jail upgrade example when behavior is firm.
.Pp
.Sh SEE ALSO
.Xr jail 8 ,
.Xr zfs 8 ,
.Xr zpool 8
.Sh HISTORY
.Nm
is based on
.Xr beadm 1
and was implemented as a project for the 2017 Summer of Code, along with
.Xr libbe 3 .
.Sh AUTHORS
.Bl -bullet
.It
Kyle Kneitinger (kneitinger)
.Ar kyle@kneit.in
.Pp
Creator of
.Nm .
.It
Slawomir Wojciech Wojtczak (vermaden)
.Ar vermaden@interia.pl
.Pp
Creator and maintainer of
.Xr beadm 1 .
.It
Bryan Drewery (bdrewery)
.Ar bryan@shatow.net
.Pp
Wrote the original
.Xr beadm 1
manual page that this one is derived from.
.El