2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 .\" Copyright (c) 2017 Kyle J. Kneitinger <kyle@kneit.in>
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
25 .Nd Utility to manage boot environments on ZFS
36 .Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot
45 .Ar beName Ns Op Cm @ Ns Ar snapshot
55 .Oo Bro Fl o Ar key Ns Cm = Ns Ar value | Fl u Ar key Brc Oc Ns ...
57 .Op Ar utility Op Ar argument ...
63 .Oo Bro Fl c Ar property | Fl C Ar property Brc Oc
73 .Brq Cm ujail | unjail
74 .Brq Ar jailId | jailName
77 .Brq Cm umount | unmount
86 command is used to setup and interact with ZFS boot environments, which are
87 bootable clones of datasets.
90 allow the system to be upgraded, while preserving the old system environment in
91 a separate ZFS dataset.
93 The following commands are supported by
95 .Bl -tag -width activate
103 as the default boot filesystem.
106 flag is given, this takes effect only for the next boot.
110 Performs a silent sanity check on the current system.
111 If boot environments are supported and used,
113 will exit with a status code of 0.
114 Any other status code is not currently defined and may, in the future, grow
115 special meaning for different degrees of sanity check failures.
119 .Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot
122 Create a new boot environment named
127 flag is given, a recursive boot environment will be made.
131 flag is specified, the new environment will be cloned from the given
134 .Ar beName Ns Cm @ Ns Ar snapshot .
135 Otherwise, the new environment will be created from the currently booted environment.
139 is creating from another boot environment, a snapshot of that boot environment will be created to clone from.
145 Create a snapshot of the boot environment named
150 flag is given, a recursive snapshot of the boot environment will be created.
151 A snapshot is created for each descendant dataset of the boot environment.
153 No new boot environment is created with this command.
157 .Ar beName Ns Op Cm @ Ns Ar snapshot
162 .Ar beName Ns Cm @ Ns Ar snapshot
163 snapshot without confirmation, unlike in
167 will automatically unmount without confirmation.
171 will warn that it is not destroying the origin of
175 flag may be specified to destroy the origin as well.
176 .It Cm export Ar sourceBe
182 must be piped or redirected to a file.
183 .It Cm import Ar targetBe
191 .Oo Bro Fl o Ar key Ns Cm = Ns Ar value | Fl u Ar key Brc Oc Ns ...
193 .Op Ar utility Op Ar argument ...
195 Create a jail of the given boot environment.
200 arguments may be specified.
202 will set a jail parameter, and
204 will unset a jail parameter.
206 By default, jails are created in interactive mode and
209 executed within the jail.
212 is specified, it will be executed instead of
214 The jail will be destroyed and the boot environment unmounted when the command
215 finishes executing, unless the
217 argument is specified.
221 argument enables batch mode, thereby disabling interactive mode.
224 argument will be ignored in batch mode.
231 must be set, the default values are specified below.
234 .Ar key Ns Cm = Ns Ar value
235 pairs are interpreted as jail parameters as described in
237 The following default parameters are provided:
238 .Bl -column "allow.mount.devfs" ""
239 .It Va allow.mount Ta Cm true
240 .It Va allow.mount.devfs Ta Cm true
241 .It Va enforce_statfs Ta Cm 1
242 .It Va name Ta Set to jail ID.
243 .It Va host.hostname Ta Va bootenv
244 .It Va path Ta Set to a path in Pa /tmp
249 All default parameters may be overwritten.
253 .Oo Bro Fl c Ar property | Fl C Ar property Brc Oc
256 Display all boot environments.
259 field indicates whether the boot environment is active now
266 .Bl -tag -width indent
268 Display all datasets.
270 Display the full space usage for each boot environment, assuming all
271 other boot environments were destroyed.
274 Do not print headers and separate fields by a single tab instead of
275 arbitrary white space.
277 Display all snapshots as well.
279 Sort boot environments by given property name.
280 The following properties are supported:
282 .Bl -tag -width 4n -offset indent -compact
283 .It name (default output)
294 option, but displays in descending order.
299 option is ignored when either the
304 .It Cm mount Ar beName Op Ar mountpoint
305 Temporarily mount the boot environment.
306 Mount at the specified
309 .It Cm rename Ar origBeName newBeName
314 The boot environment will not be unmounted in order for this rename to occur.
315 .It Cm ujail Bro Ar jailId | jailName Brc Ar beName
316 .It Cm unjail Bro Ar jailId | jailName Brc Ar beName
317 Destroy the jail created from the given boot environment.
328 Unmount the given boot environment, if it is mounted.
331 will force the unmount if busy.
335 prints usage information if
343 To fill in with jail upgrade example when behavior is firm.
355 and was implemented as a project for the 2017 Summer of Code, along with
360 .An Kyle Kneitinger (kneitinger) Aq Mt kyle@kneit.in .
363 was written and is maintained by
364 .An Slawomir Wojciech Wojtczak (vermaden) Aq Mt vermaden@interia.pl .
366 .An Bryan Drewery (bdrewery) Aq Mt bryan@shatow.net
369 manual page that this one is derived from.