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 ...
55 .Brq Ar jailID | jailName
57 .Op Ar utility Op Ar argument ...
70 .Brq Cm ujail | unjail
71 .Brq Ar jailID | jailName
74 .Brq Cm umount | unmount
80 command is used to setup and interact with ZFS boot environments, which are
81 bootable clones of datasets.
84 allows the system to be upgraded, while preserving the old system environment in
85 a separate ZFS dataset.
87 The following commands are supported by
89 .Bl -tag -width activate
97 as the default boot filesystem.
100 flag is given, this takes effect only for the next boot.
104 .Op Fl e Brq Ar nonActiveBe | beName@snapshot
107 Creates a new boot environment named
111 argument is specified, the new environment will be cloned from the given
112 .Brq Ar nonActiveBe | Ar beName@snapshot .
115 flag is given, a recursive boot environment will be made.
121 Creates a snapshot of the existing boot environment named
125 flag is given, a recursive boot environment will be made.
129 .Brq Ar beName | beName@snapshot
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 ...
155 .Brq Ar jailID | jailName
157 .Op Ar utility Op Ar argument ...
159 Creates a jail of the given boot environment.
164 arguments may be specified.
166 will set a jail parameter, and
168 will unset a jail parameter.
170 By default, jails are created in interactive mode and
173 executed within the jail.
176 is specified, it will be executed instead of
178 The jail will be destroyed and the boot environment unmounted when the command
179 finishes executing, unless the
181 argument is specified.
185 argument enables batch mode, thereby disabling interactive mode.
188 argument will be ignored in batch mode.
195 may not actually be unset.
196 Attempts to unset any of these will revert them to the default values specified
197 below, if they have been overwritten by
201 .Ar key Ns = Ns Ar value
202 pairs are interpreted as jail parameters as described in
204 The following default parameters are provided:
205 .Bl -column "allow.mount.devfs" ""
206 .It Va allow.mount Ta Cm true
207 .It Va allow.mount.devfs Ta Cm true
208 .It Va enforce_statfs Ta Cm 1
209 .It Va name Ta Va bootenv
210 .It Va host.hostname Ta Va bootenv
211 .It Va path Ta Set to a path in /tmp generated by
215 All default parameters may be overwritten.
216 .It Cm list Op Fl DHas
217 Displays all boot environments.
218 The Active field indicates whether the boot environment is active now (N);
219 active on reboot (R); or both (NR).
223 is used, display all datasets.
226 is used, display the full space usage for each boot environment, assuming all
227 other boot environments were destroyed.
230 option is used for scripting.
231 It does not print headers and separate fields by a single tab instead of
232 arbitrary white space.
235 is used, display all snapshots as well.
236 .It Cm mount Ar beName Op Ar mountpoint
237 Temporarily mount the boot environment.
238 Mount at the specified
241 .It Cm rename Ar origBeName newBeName
242 Renames the given nonactive
246 .It Cm unjail Brq Ar jailID | jailName | beName
247 Destroys the jail created from the given boot environment.
253 Unmount the given boot environment, if it is mounted.
256 will force the unmount if busy.
261 To fill in with jail upgrade example when behavior is firm.
271 and was implemented as a project for the 2017 Summer of Code, along with
276 .An Kyle Kneitinger (kneitinger) Aq Mt kyle@kneit.in .
279 was written and is maintained by
280 .An Slawomir Wojciech Wojtczak (vermaden) Aq Mt vermaden@interia.pl .
282 .An Bryan Drewery (bdrewery) Aq Mt bryan@shatow.net
285 manual page that this one is derived from.