2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 .\" Copyright (c) 2017 Kyle J. Kneitinger <kyle@kneit.in>
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
26 .Nd Utility to manage Boot Environments on ZFS
35 .Op Fl e Brq Ar nonActiveBe | beName@snapshot
44 .Brq Ar beName | beName@snapshot
54 .Oo Bro Fl o Ar key Ns = Ns Ar value | Fl u Ar key Brc Oc Ns ...
56 .Op Ar utility Op Ar argument ...
69 .Brq Cm ujail | unjail
70 .Brq Ar jailID | jailName
73 .Brq Cm umount | unmount
79 command is used to setup and interact with ZFS boot environments, which are
80 bootable clones of datasets.
83 allows the system to be upgraded, while preserving the old system environment in
84 a separate ZFS dataset.
86 The following commands are supported by
88 .Bl -tag -width activate
96 as the default boot filesystem.
99 flag is given, this takes effect only for the next boot.
103 .Op Fl e Brq Ar nonActiveBe | beName@snapshot
106 Creates a new boot environment named
110 argument is specified, the new environment will be cloned from the given
111 .Brq Ar nonActiveBe | Ar beName@snapshot .
114 flag is given, a recursive boot environment will be made.
120 Creates a snapshot of the existing boot environment named
124 flag is given, a recursive boot environment will be made.
128 .Brq Ar beName | beName@snapshot
134 snapshot without confirmation, unlike in
138 will automatically unmount without confirmation.
142 will warn that it is not destroying the origin of
146 flag may be specified to destroy the origin as well.
147 .It Cm export Ar sourceBe
153 must be piped or redirected to a file.
154 .It Cm import Ar targetBe
162 .Oo Bro Fl o Ar key Ns = Ns Ar value | Fl u Ar key Brc Oc Ns ...
164 .Op Ar utility Op Ar argument ...
166 Creates a jail of the given boot environment.
171 arguments may be specified.
173 will set a jail parameter, and
175 will unset a jail parameter.
177 By default, jails are created in interactive mode and
180 executed within the jail.
183 is specified, it will be executed instead of
185 The jail will be destroyed and the boot environment unmounted when the command
186 finishes executing, unless the
188 argument is specified.
192 argument enables batch mode, thereby disabling interactive mode.
195 argument will be ignored in batch mode.
202 must be set, the default values are specified below.
205 .Ar key Ns = Ns Ar value
206 pairs are interpreted as jail parameters as described in
208 The following default parameters are provided:
209 .Bl -column "allow.mount.devfs" ""
210 .It Va allow.mount Ta Cm true
211 .It Va allow.mount.devfs Ta Cm true
212 .It Va enforce_statfs Ta Cm 1
213 .It Va name Ta jail id
214 .It Va host.hostname Ta Va bootenv
215 .It Va path Ta Set to a path in /tmp generated by
219 All default parameters may be overwritten.
220 .It Cm list Op Fl DHas
221 Displays all boot environments.
222 The Active field indicates whether the boot environment is active now (N);
223 active on reboot (R); or both (NR).
227 is used, display all datasets.
230 is used, display the full space usage for each boot environment, assuming all
231 other boot environments were destroyed.
234 option is used for scripting.
235 It does not print headers and separate fields by a single tab instead of
236 arbitrary white space.
239 is used, display all snapshots as well.
240 .It Cm mount Ar beName Op Ar mountpoint
241 Temporarily mount the boot environment.
242 Mount at the specified
245 .It Cm rename Ar origBeName newBeName
250 The boot environment will not be unmounted in order for this rename to occur.
251 .It Cm unjail Brq Ar jailID | jailName | beName
252 Destroys the jail created from the given boot environment.
258 Unmount the given boot environment, if it is mounted.
261 will force the unmount if busy.
266 To fill in with jail upgrade example when behavior is firm.
277 and was implemented as a project for the 2017 Summer of Code, along with
282 .An Kyle Kneitinger (kneitinger) Aq Mt kyle@kneit.in .
285 was written and is maintained by
286 .An Slawomir Wojciech Wojtczak (vermaden) Aq Mt vermaden@interia.pl .
288 .An Bryan Drewery (bdrewery) Aq Mt bryan@shatow.net
291 manual page that this one is derived from.