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

FreeBSD Manual Pages

  
 
  

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

NAME
     bectl -- Utility to manage	boot environments on ZFS

SYNOPSIS
     bectl activate [-t] beName
     bectl create [-r] [-e {nonActiveBe	| beName@snapshot}] newBeName
     bectl destroy [-Fo] beName[@snapshot]
     bectl export sourceBe
     bectl import targetBe
     bectl jail	[-bU] [{-o key=value | -u key}]... beName
	   [utility [argument ...]]
     bectl list	[-aDHs]
     bectl mount beName	[mountpoint]
     bectl rename origBeName newBeName
     bectl {ujail | unjail} {jailId | jailName}	beName
     bectl {umount | unmount} [-f] beName

     bectl [-h?]

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

     Boot environments allow 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
	       boot.

     create [-r] [-e {nonActiveBe | beName@snapshot}] newBeName
	       Create a	new boot environment named newBeName.

	       If the -r flag is given,	a recursive boot environment will be
	       made.

	       If the -e flag is specified, the	new environment	will be	cloned
	       from the	given nonActiveBe or beName@snapshot.  Otherwise, the
	       new environment will be created from the	currently booted envi-
	       ronment.

	       If bectl	is creating from another boot environment, a snapshot
	       of that boot environment	will be	created	to clone from.

     destroy [-Fo] beName[@snapshot]
	       Destroy the given beName	boot environment or beName@snapshot
	       snapshot	without	confirmation, unlike in	beadm(1).  Specifying
	       -F will automatically unmount without confirmation.

	       By default, bectl will warn that	it is not destroying the ori-
	       gin of beName.  The -o flag may be specified to destroy the
	       origin as well.

     export sourceBe
	       Export sourceBe to stdout(4).  stdout(4)	must be	piped or redi-
	       rected to a file.

     import targetBe
	       Import targetBe from stdin(4).

     jail [-bU]	[{-o key=value | -u key}]... beName [utility [argument ...]]
	       Create 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 must be set, the default val-
	       ues are specified below.

	       All key=value pairs are interpreted as jail parameters as
	       described in jail(8).  The following default parameters are
	       provided:

	       allow.mount	    true
	       allow.mount.devfs    true
	       enforce_statfs	    1
	       name		    Set	to jail	ID.
	       host.hostname	    bootenv
	       path		    Set	to a path in /tmp generated by
					libbe(3).

	       All default parameters may be overwritten.

     list [-aDHs]
	       Display all boot	environments.  The Active field	indicates
	       whether the boot	environment is active now (N); active on
	       reboot (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
	       Rename the given	origBeName to the given	newBeName.  The	boot
	       environment will	not be unmounted in order for this rename to
	       occur.

     ujail {jailId | jailName} beName

     unjail {jailId | jailName}	beName
	       Destroy the jail	created	from the given boot environment.

     umount [-f] beName

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

     bectl prints usage	information if -h or -?	is specified.

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

SEE ALSO
     beinstall.sh(1), libbe(3),	jail(8), zfs(8), zpool(8)

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

AUTHORS
     bectl was written by Kyle Kneitinger (kneitinger) <kyle@kneit.in>.

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

     Bryan Drewery (bdrewery) <bryan@shatow.net> wrote the original beadm(1)
     manual page that this one is derived from.

BSD				 April 3, 2019				   BSD

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | SEE ALSO | HISTORY | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=bectl&sektion=8&manpath=FreeBSD+13-current>

home | help