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.
139 .It Cm export Ar sourceBe
145 must be piped or redirected to a file.
146 .It Cm import Ar targetBe
154 .Oo Bro Fl o Ar key Ns = Ns Ar value | Fl u Ar key Brc Oc Ns ...
156 .Op Ar utility Op Ar argument ...
158 Creates a jail of the given boot environment.
163 arguments may be specified.
165 will set a jail parameter, and
167 will unset a jail parameter.
169 By default, jails are created in interactive mode and
172 executed within the jail.
175 is specified, it will be executed instead of
177 The jail will be destroyed and the boot environment unmounted when the command
178 finishes executing, unless the
180 argument is specified.
184 argument enables batch mode, thereby disabling interactive mode.
187 argument will be ignored in batch mode.
194 must be set, the default values are specified below.
197 .Ar key Ns = Ns Ar value
198 pairs are interpreted as jail parameters as described in
200 The following default parameters are provided:
201 .Bl -column "allow.mount.devfs" ""
202 .It Va allow.mount Ta Cm true
203 .It Va allow.mount.devfs Ta Cm true
204 .It Va enforce_statfs Ta Cm 1
205 .It Va name Ta jail id
206 .It Va host.hostname Ta Va bootenv
207 .It Va path Ta Set to a path in /tmp generated by
211 All default parameters may be overwritten.
212 .It Cm list Op Fl DHas
213 Displays all boot environments.
214 The Active field indicates whether the boot environment is active now (N);
215 active on reboot (R); or both (NR).
219 is used, display all datasets.
222 is used, display the full space usage for each boot environment, assuming all
223 other boot environments were destroyed.
226 option is used for scripting.
227 It does not print headers and separate fields by a single tab instead of
228 arbitrary white space.
231 is used, display all snapshots as well.
232 .It Cm mount Ar beName Op Ar mountpoint
233 Temporarily mount the boot environment.
234 Mount at the specified
237 .It Cm rename Ar origBeName newBeName
242 The boot environment will not be unmounted in order for this rename to occur.
243 .It Cm unjail Brq Ar jailID | jailName | beName
244 Destroys the jail created from the given boot environment.
250 Unmount the given boot environment, if it is mounted.
253 will force the unmount if busy.
258 To fill in with jail upgrade example when behavior is firm.
269 and was implemented as a project for the 2017 Summer of Code, along with
274 .An Kyle Kneitinger (kneitinger) Aq Mt kyle@kneit.in .
277 was written and is maintained by
278 .An Slawomir Wojciech Wojtczak (vermaden) Aq Mt vermaden@interia.pl .
280 .An Bryan Drewery (bdrewery) Aq Mt bryan@shatow.net
283 manual page that this one is derived from.