Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
BECTL(8)		  BSD System Manager's Manual		      BECTL(8)

     bectl -- Utility to manage	Boot Environments on ZFS

     bectl activate [-t] beName
     bectl create [-r] [-e {nonActiveBe	| beName@snapshot}] beName
     bectl create [-r] beName@snapshot
     bectl destroy [-F]	{beName	| beName@snapshot}
     bectl export sourceBe
     bectl import targetBe
     bectl jail	{-b | -U} [{-o key=value | -u key}]... {jailID | jailName}
	   bootenv [utility [argument ...]]
     bectl list	[-DHas]
     bectl mount beName	[mountpoint]
     bectl rename origBeName newBeName
     bectl {ujail | unjail} {jailID | jailName}	bootenv
     bectl {umount | unmount} [-f] beName

     The bectl command is used to setup	and interact with ZFS boot environ-
     ments, which are bootable clones of datasets.

     Boot Environments allows the system to be upgraded, while preserving the
     old system	environment in a separate ZFS dataset.

     The following commands are	supported by bectl:

     activate [-t] beName
	       Activate	the given beName as the	default	boot filesystem.  If
	       the [-t]	flag is	given, this takes effect only for the next

     create [-r] [-e {nonActiveBe | beName@snapshot}] beName
	       Creates a new boot environment named beName.  If	the -e argu-
	       ment is specified, the new environment will be cloned from the
	       given {nonActiveBe | beName@snapshot}.  If the -r flag is
	       given, a	recursive boot environment will	be made.

     create [-r] beName@snapshot
	       Creates a snapshot of the existing boot environment named
	       beName.	If the -r flag is given, a recursive boot environment
	       will be made.

     destroy [-F] {beName | beName@snapshot}
	       Destroys	the given beName boot environment or beName@snapshot
	       snapshot	without	confirmation, unlike in	beadm.	Specifying -F
	       will automatically unmount without confirmation.

     export sourceBe
	       Export sourceBe to stdout.  stdout must be piped	or redirected
	       to a file.

     import targetBe
	       Import targetBe from stdin.

     jail {-b |	-U} [{-o key=value | -u	key}]... {jailID | jailName} <bootenv>
	       [utility	[argument ...]]
	       Creates a jail of the given boot	environment.  Multiple -o and
	       -u arguments may	be specified.  -o will set a jail parameter,
	       and -u will unset a jail	parameter.

	       By default, jails are created in	interactive mode and /bin/sh
	       is executed within the jail.  If	utility	is specified, it will
	       be executed instead of /bin/sh.	The jail will be destroyed and
	       the boot	environment unmounted when the command finishes	exe-
	       cuting, unless the -U argument is specified.

	       The -b argument enables batch mode, thereby disabling interac-
	       tive mode.  The -U argument will	be ignored in batch mode.

	       The name, host.hostname,	and path may not actually be unset.
	       Attempts	to unset any of	these will revert them to the default
	       values specified	below, if they have been overwritten by	-o.

	       All key=value pairs are interpreted as jail parameters as de-
	       scribed in jail(8).  The	following default parameters are pro-

	       allow.mount	    true
	       allow.mount.devfs    true
	       enforce_statfs	    1
	       name		    bootenv
	       host.hostname	    bootenv
	       path		    Set	to a path in /tmp generated by

	       All default parameters may be overwritten.

     list [-DHas]
	       Displays	all boot environments.	The Active field indicates
	       whether the boot	environment is active now (N); active on re-
	       boot (R); or both (NR).

	       If -a is	used, display all datasets.  If	-D is used, display
	       the full	space usage for	each boot environment, assuming	all
	       other boot environments were destroyed.	The -H option is used
	       for scripting.  It does not print headers and separate fields
	       by a single tab instead of arbitrary white space.  If -s	is
	       used, display all snapshots as well.

     mount beName [mountpoint]
	       Temporarily mount the boot environment.	Mount at the specified
	       mountpoint if provided.

     rename origBeName newBeName
	       Renames the given origBeName to the given newBeName.  The boot
	       environment will	not be unmounted in order for this rename to

     unjail {jailID | jailName | beName}
	       Destroys	the jail created from the given	boot environment.

     unmount [-f] beName
	       Unmount the given boot environment, if it is mounted.  Specify-
	       ing -f will force the unmount if	busy.

     +o	 To fill in with jail upgrade example when behavior is firm.

     jail(8), zfs(8), zpool(8)

     bectl is based on beadm and was implemented as a project for the 2017
     Summer of Code, along with	libbe(3).

     bectl was written by Kyle Kneitinger (kneitinger) <>.

     beadm was written and is maintained by
     Slawomir Wojciech Wojtczak	(vermaden) <>.

     Bryan Drewery (bdrewery) <> wrote the original beadm man-
     ual page that this	one is derived from.

BSD				August 24, 2018				   BSD


Want to link to this manual page? Use this URL:

home | help