xref: /freebsd/sbin/bectl/bectl.8 (revision edbfe3bcb5052670e21e601703f4d5b7c1969acc)
15952343eSKyle Evans.\"
25952343eSKyle Evans.\" be - Utility to manage Boot Environments on the ZFS filesystem
35952343eSKyle Evans.\"
45952343eSKyle Evans.\" Redistribution and use in source and binary forms, with or without
55952343eSKyle Evans.\" modification, are permitted provided that the following conditions
65952343eSKyle Evans.\" are met:
75952343eSKyle Evans.\" 1. Redistributions of source code must retain the above copyright
85952343eSKyle Evans.\"    notice, this list of conditions and the following disclaimer.
95952343eSKyle Evans.\" 2. Redistributions in binary form must reproduce the above copyright
105952343eSKyle Evans.\"    notice, this list of conditions and the following disclaimer in the
115952343eSKyle Evans.\"    documentation and/or other materials provided with the distribution.
125952343eSKyle Evans.\"
135952343eSKyle Evans.\"
145952343eSKyle Evans.\"     @(#)be.1
155952343eSKyle Evans.\" $FreeBSD$
165952343eSKyle Evans.\"
17*edbfe3bcSKyle Evans.Dd July 24, 2018
18*edbfe3bcSKyle Evans.Dt BECTL 8
195952343eSKyle Evans.Os FreeBSD
205952343eSKyle Evans.Sh NAME
21*edbfe3bcSKyle Evans.Nm bectl
225952343eSKyle Evans.Nd Utility to manage Boot Environments on ZFS
235952343eSKyle Evans.Sh SYNOPSIS
245952343eSKyle Evans.Nm
255952343eSKyle Evansactivate
265952343eSKyle Evans.Op Fl t
275952343eSKyle Evans.Ao Ar beName Ac
285952343eSKyle Evans.Nm
295952343eSKyle Evanscreate
305952343eSKyle Evans.Op Fl r
315952343eSKyle Evans.Op Fl e Ar nonActiveBe | Fl e Ar beName@snapshot
325952343eSKyle Evans.Ao Ar beName Ac
335952343eSKyle Evans.Nm
345952343eSKyle Evanscreate
355952343eSKyle Evans.Op Fl r
365952343eSKyle Evans.Ao Ar beName@snapshot Ac
375952343eSKyle Evans.Nm
385952343eSKyle Evansdestroy
395952343eSKyle Evans.Op Fl F
405952343eSKyle Evans.Ao Ar beName | beName@snapshot Ac
415952343eSKyle Evans.Nm
425952343eSKyle Evansjail
435952343eSKyle Evans.Ao Ar jailID | jailName Ac
445952343eSKyle Evans.Ao Ar bootenv Ac
455952343eSKyle Evans.Nm
465952343eSKyle Evanslist
475952343eSKyle Evans.Op Fl a
485952343eSKyle Evans.Op Fl D
495952343eSKyle Evans.Op Fl H
505952343eSKyle Evans.Op Fl s
515952343eSKyle Evans.Nm
525952343eSKyle Evansmount
535952343eSKyle Evans.Ao Ar beName Ac
545952343eSKyle Evans.Op mountpoint
555952343eSKyle Evans.Nm
565952343eSKyle Evansrename
575952343eSKyle Evans.Ao Ar origBeName Ac
585952343eSKyle Evans.Ao Ar newBeName Ac
595952343eSKyle Evans.Nm
605952343eSKyle Evans{ ujail | unjail }
615952343eSKyle Evans.Ao Ar jailID | jailName Ac
625952343eSKyle Evans.Ao Ar bootenv Ac
635952343eSKyle Evans.Nm
645952343eSKyle Evans{ umount | unmount }
655952343eSKyle Evans.Op Fl f
665952343eSKyle Evans.Ao Ar beName Ac
675952343eSKyle Evans.Sh DESCRIPTION
685952343eSKyle EvansThe
695952343eSKyle Evans.Nm
705952343eSKyle Evanscommand is used to setup and interact with ZFS boot environments, which are bootable clones of datasets.
715952343eSKyle Evans.Pp
725952343eSKyle Evans.Em Boot Environments
735952343eSKyle Evansallows the system to be upgraded, while preserving the old system environment in a separate ZFS dataset.
745952343eSKyle Evans.Pp
755952343eSKyle Evans.Sh COMMANDS
765952343eSKyle EvansThe following commands are supported by
775952343eSKyle Evans.Nm :
785952343eSKyle Evans.Bl -tag -width activate
795952343eSKyle Evans.It Ic activate
805952343eSKyle Evans.Op Fl t
815952343eSKyle Evans.Ar <beName>
825952343eSKyle Evans.Pp
835952343eSKyle EvansActivate the given
845952343eSKyle Evans.Ar beName
855952343eSKyle Evansas the default boot filesystem. If the
865952343eSKyle Evans.Op Fl t
875952343eSKyle Evansflag is given, this takes effect only for the next boot.
885952343eSKyle Evans.Pp
895952343eSKyle Evans.It Ic create
905952343eSKyle Evans.Op Fl r
915952343eSKyle Evans.Op Fl e Ar nonActiveBe | Fl e Ar beName@snapshot
925952343eSKyle Evans.Ao Ar beName Ac
935952343eSKyle Evans.Pp
945952343eSKyle EvansCreates a new boot environment named
955952343eSKyle Evans.Ar beName .
965952343eSKyle EvansIf the -e param is specified, the new environment will be cloned from the given
975952343eSKyle Evans.Ar nonActiveBe | Ar beName@snapshot .
985952343eSKyle EvansIf the
995952343eSKyle Evans.Op Fl r
1005952343eSKyle Evansflag is given, a recursive boot environment will be made.
1015952343eSKyle Evans.Pp
1025952343eSKyle Evans.It Ic create
1035952343eSKyle Evans.Op Fl r
1045952343eSKyle Evans.Ao Ar beName@snapshot Ac
1055952343eSKyle Evans.Pp
1065952343eSKyle EvansCreates a snapshot of the existing boot environment named
1075952343eSKyle Evans.Ar beName .
1085952343eSKyle EvansIf the
1095952343eSKyle Evans.Op Fl r
1105952343eSKyle Evansflag is given, a recursive boot environment will be made.
1115952343eSKyle Evans.Pp
1125952343eSKyle Evans.It Ic destroy
1135952343eSKyle Evans.Op Fl F
1145952343eSKyle Evans.Ao Ar beName | beName@snapshot Ac
1155952343eSKyle Evans.Pp
1165952343eSKyle EvansDestroys the given
1175952343eSKyle Evans.Ar beName
1185952343eSKyle Evansboot environment or
1195952343eSKyle Evans.Ar beName@snapshot
1205952343eSKyle Evanssnapshot.
1215952343eSKyle EvansSpecifying
1225952343eSKyle Evans.Fl F
1235952343eSKyle Evanswill automatically unmount without confirmation.
1245952343eSKyle Evans.Pp
1255952343eSKyle Evans.It Ic jail
1265952343eSKyle Evans.Ao Ar jailID | jailName Ac
1275952343eSKyle Evans.Ao Ar bootenv Ac
1285952343eSKyle Evans.Pp
1295952343eSKyle EvansCreates a jail of the given boot environment.
1305952343eSKyle Evans.Pp
1315952343eSKyle Evans.It Ic list
1325952343eSKyle Evans.Op Fl a
1335952343eSKyle Evans.Op Fl D
1345952343eSKyle Evans.Op Fl H
1355952343eSKyle Evans.Op Fl s
1365952343eSKyle Evans.Pp
1375952343eSKyle EvansDisplays all boot environments.
1385952343eSKyle EvansThe Active field indicates whether the boot environment is active now (N); active on reboot (R); or both (NR).
1395952343eSKyle Evans.Pp
1405952343eSKyle EvansIf
1415952343eSKyle Evans.Fl a
1425952343eSKyle Evansis used, display all datasets.
1435952343eSKyle EvansIf
1445952343eSKyle Evans.Fl D
1455952343eSKyle Evansis used, display the full space usage for each boot environment, assuming all other boot environments were destroyed.
1465952343eSKyle EvansThe
1475952343eSKyle Evans.Fl H
1485952343eSKyle Evansoption is used for scripting. It does not print headers and separate fields by a single tab instead of arbitrary white space.
1495952343eSKyle EvansIf
1505952343eSKyle Evans.Fl s
1515952343eSKyle Evansis used, display all snapshots as well.
1525952343eSKyle Evans.Pp
1535952343eSKyle Evans.It Ic mount
1545952343eSKyle Evans.Ao Ar beName Ac
1555952343eSKyle Evans.Op mountpoint
1565952343eSKyle Evans.Pp
1575952343eSKyle EvansTemporarily mount the boot environment.
1585952343eSKyle EvansMount at the specified
1595952343eSKyle Evans.Ar mountpoint
1605952343eSKyle Evansif provided.
1615952343eSKyle Evans.Pp
1625952343eSKyle Evans.It Ic rename Ao Ar origBeName Ac Ao Ar newBeName Ac
1635952343eSKyle Evans.Pp
1645952343eSKyle EvansRenames the given nonactive
1655952343eSKyle Evans.Ar origBeName
1665952343eSKyle Evansto the given
1675952343eSKyle Evans.Ar newBeName
1685952343eSKyle Evans.Pp
1695952343eSKyle Evans.It Ic unmount
1705952343eSKyle Evans.Op Fl f
1715952343eSKyle Evans.Ao Ar beName Ac
1725952343eSKyle Evans.Pp
1735952343eSKyle EvansUnmount the given boot environment, if it is mounted.
1745952343eSKyle EvansSpecifying
1755952343eSKyle Evans.Fl f
1765952343eSKyle Evanswill force the unmount if busy.
1775952343eSKyle Evans.Pp
1785952343eSKyle Evans.It Ic unjail
1795952343eSKyle Evans.Ao Ar beName Ac
1805952343eSKyle Evans.Pp
1815952343eSKyle EvansDestroys the jail created from the given boot environment.
1825952343eSKyle Evans.Pp
1835952343eSKyle Evans.El
1845952343eSKyle Evans.Sh EXAMPLES
1855952343eSKyle Evans.Bl -bullet
1865952343eSKyle Evans.It
1875952343eSKyle EvansTo fill in with jail upgrade example when behavior is firm.
1885952343eSKyle Evans.Pp
1895952343eSKyle Evans.Sh SEE ALSO
1905952343eSKyle Evans.Xr jail 8 ,
1915952343eSKyle Evans.Xr zfs 8 ,
1925952343eSKyle Evans.Xr zpool 8
1935952343eSKyle Evans.Sh HISTORY
1945952343eSKyle Evans.Nm
1955952343eSKyle Evansis based on
1965952343eSKyle Evans.Xr beadm 1
1975952343eSKyle Evansand was implemented as a project for the 2017 Summer of Code, along with
1985952343eSKyle Evans.Xr libbe 3 .
1995952343eSKyle Evans.Sh AUTHORS
2005952343eSKyle Evans.Bl -bullet
2015952343eSKyle Evans.It
2025952343eSKyle EvansKyle Kneitinger (kneitinger)
2035952343eSKyle Evans.Ar kyle@kneit.in
2045952343eSKyle Evans.Pp
2055952343eSKyle EvansCreator of
2065952343eSKyle Evans.Nm .
2075952343eSKyle Evans.It
2085952343eSKyle EvansSlawomir Wojciech Wojtczak (vermaden)
2095952343eSKyle Evans.Ar vermaden@interia.pl
2105952343eSKyle Evans.Pp
2115952343eSKyle EvansCreator and maintainer of
2125952343eSKyle Evans.Xr beadm 1 .
2135952343eSKyle Evans.It
2145952343eSKyle EvansBryan Drewery (bdrewery)
2155952343eSKyle Evans.Ar bryan@shatow.net
2165952343eSKyle Evans.Pp
2175952343eSKyle EvansWrote the original
2185952343eSKyle Evans.Xr beadm 1
2195952343eSKyle Evansmanual page that this one is derived from.
2205952343eSKyle Evans.El
221