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
135 snapshot without confirmation, unlike in
139 will automatically unmount without confirmation.
140 .It Cm export Ar sourceBe
146 must be piped or redirected to a file.
147 .It Cm import Ar targetBe
155 .Oo Bro Fl o Ar key Ns = Ns Ar value | Fl u Ar key Brc Oc Ns ...
156 .Brq Ar jailID | jailName
158 .Op Ar utility Op Ar argument ...
160 Creates a jail of the given boot environment.
165 arguments may be specified.
167 will set a jail parameter, and
169 will unset a jail parameter.
171 By default, jails are created in interactive mode and
174 executed within the jail.
177 is specified, it will be executed instead of
179 The jail will be destroyed and the boot environment unmounted when the command
180 finishes executing, unless the
182 argument is specified.
186 argument enables batch mode, thereby disabling interactive mode.
189 argument will be ignored in batch mode.
196 may not actually be unset.
197 Attempts to unset any of these will revert them to the default values specified
198 below, if they have been overwritten by
202 .Ar key Ns = Ns Ar value
203 pairs are interpreted as jail parameters as described in
205 The following default parameters are provided:
206 .Bl -column "allow.mount.devfs" ""
207 .It Va allow.mount Ta Cm true
208 .It Va allow.mount.devfs Ta Cm true
209 .It Va enforce_statfs Ta Cm 1
210 .It Va name Ta Va bootenv
211 .It Va host.hostname Ta Va bootenv
212 .It Va path Ta Set to a path in /tmp generated by
216 All default parameters may be overwritten.
217 .It Cm list Op Fl DHas
218 Displays all boot environments.
219 The Active field indicates whether the boot environment is active now (N);
220 active on reboot (R); or both (NR).
224 is used, display all datasets.
227 is used, display the full space usage for each boot environment, assuming all
228 other boot environments were destroyed.
231 option is used for scripting.
232 It does not print headers and separate fields by a single tab instead of
233 arbitrary white space.
236 is used, display all snapshots as well.
237 .It Cm mount Ar beName Op Ar mountpoint
238 Temporarily mount the boot environment.
239 Mount at the specified
242 .It Cm rename Ar origBeName newBeName
247 The boot environment will not be unmounted in order for this rename to occur.
248 .It Cm unjail Brq Ar jailID | jailName | beName
249 Destroys the jail created from the given boot environment.
255 Unmount the given boot environment, if it is mounted.
258 will force the unmount if busy.
263 To fill in with jail upgrade example when behavior is firm.
274 and was implemented as a project for the 2017 Summer of Code, along with
279 .An Kyle Kneitinger (kneitinger) Aq Mt kyle@kneit.in .
282 was written and is maintained by
283 .An Slawomir Wojciech Wojtczak (vermaden) Aq Mt vermaden@interia.pl .
285 .An Bryan Drewery (bdrewery) Aq Mt bryan@shatow.net
288 manual page that this one is derived from.