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*d694059fSKyle Evans.Dd August 5, 2018 18edbfe3bcSKyle Evans.Dt BECTL 8 195952343eSKyle Evans.Os FreeBSD 205952343eSKyle Evans.Sh NAME 21edbfe3bcSKyle 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 43*d694059fSKyle Evans.Op Fl o Ar key Ns = Ns Ar value Oc Ns ... 445952343eSKyle Evans.Ao Ar jailID | jailName Ac 455952343eSKyle Evans.Ao Ar bootenv Ac 465952343eSKyle Evans.Nm 475952343eSKyle Evanslist 485952343eSKyle Evans.Op Fl a 495952343eSKyle Evans.Op Fl D 505952343eSKyle Evans.Op Fl H 515952343eSKyle Evans.Op Fl s 525952343eSKyle Evans.Nm 535952343eSKyle Evansmount 545952343eSKyle Evans.Ao Ar beName Ac 555952343eSKyle Evans.Op mountpoint 565952343eSKyle Evans.Nm 575952343eSKyle Evansrename 585952343eSKyle Evans.Ao Ar origBeName Ac 595952343eSKyle Evans.Ao Ar newBeName Ac 605952343eSKyle Evans.Nm 615952343eSKyle Evans{ ujail | unjail } 625952343eSKyle Evans.Ao Ar jailID | jailName Ac 635952343eSKyle Evans.Ao Ar bootenv Ac 645952343eSKyle Evans.Nm 655952343eSKyle Evans{ umount | unmount } 665952343eSKyle Evans.Op Fl f 675952343eSKyle Evans.Ao Ar beName Ac 685952343eSKyle Evans.Sh DESCRIPTION 695952343eSKyle EvansThe 705952343eSKyle Evans.Nm 715952343eSKyle Evanscommand is used to setup and interact with ZFS boot environments, which are bootable clones of datasets. 725952343eSKyle Evans.Pp 735952343eSKyle Evans.Em Boot Environments 745952343eSKyle Evansallows the system to be upgraded, while preserving the old system environment in a separate ZFS dataset. 755952343eSKyle Evans.Pp 765952343eSKyle Evans.Sh COMMANDS 775952343eSKyle EvansThe following commands are supported by 785952343eSKyle Evans.Nm : 795952343eSKyle Evans.Bl -tag -width activate 805952343eSKyle Evans.It Ic activate 815952343eSKyle Evans.Op Fl t 825952343eSKyle Evans.Ar <beName> 835952343eSKyle Evans.Pp 845952343eSKyle EvansActivate the given 855952343eSKyle Evans.Ar beName 865952343eSKyle Evansas the default boot filesystem. If the 875952343eSKyle Evans.Op Fl t 885952343eSKyle Evansflag is given, this takes effect only for the next boot. 895952343eSKyle Evans.Pp 905952343eSKyle Evans.It Ic create 915952343eSKyle Evans.Op Fl r 925952343eSKyle Evans.Op Fl e Ar nonActiveBe | Fl e Ar beName@snapshot 935952343eSKyle Evans.Ao Ar beName Ac 945952343eSKyle Evans.Pp 955952343eSKyle EvansCreates a new boot environment named 965952343eSKyle Evans.Ar beName . 975952343eSKyle EvansIf the -e param is specified, the new environment will be cloned from the given 985952343eSKyle Evans.Ar nonActiveBe | Ar beName@snapshot . 995952343eSKyle EvansIf the 1005952343eSKyle Evans.Op Fl r 1015952343eSKyle Evansflag is given, a recursive boot environment will be made. 1025952343eSKyle Evans.Pp 1035952343eSKyle Evans.It Ic create 1045952343eSKyle Evans.Op Fl r 1055952343eSKyle Evans.Ao Ar beName@snapshot Ac 1065952343eSKyle Evans.Pp 1075952343eSKyle EvansCreates a snapshot of the existing boot environment named 1085952343eSKyle Evans.Ar beName . 1095952343eSKyle EvansIf the 1105952343eSKyle Evans.Op Fl r 1115952343eSKyle Evansflag is given, a recursive boot environment will be made. 1125952343eSKyle Evans.Pp 1135952343eSKyle Evans.It Ic destroy 1145952343eSKyle Evans.Op Fl F 1155952343eSKyle Evans.Ao Ar beName | beName@snapshot Ac 1165952343eSKyle Evans.Pp 1175952343eSKyle EvansDestroys the given 1185952343eSKyle Evans.Ar beName 1195952343eSKyle Evansboot environment or 1205952343eSKyle Evans.Ar beName@snapshot 1215952343eSKyle Evanssnapshot. 1225952343eSKyle EvansSpecifying 1235952343eSKyle Evans.Fl F 1245952343eSKyle Evanswill automatically unmount without confirmation. 1255952343eSKyle Evans.Pp 1265952343eSKyle Evans.It Ic jail 127*d694059fSKyle Evans.Op Fl o Ar key Ns = Ns Ar value Oc Ns ... 1285952343eSKyle Evans.Ao Ar jailID | jailName Ac 1295952343eSKyle Evans.Ao Ar bootenv Ac 1305952343eSKyle Evans.Pp 1315952343eSKyle EvansCreates a jail of the given boot environment. 132*d694059fSKyle EvansMultiple 133*d694059fSKyle Evans.Fl o 134*d694059fSKyle Evansarguments may be specified. 135*d694059fSKyle EvansAl 136*d694059fSKyle Evans.Ar key , 137*d694059fSKyle Evans.Ar value 138*d694059fSKyle Evanspairs are interpreted as jail parameters as described in 139*d694059fSKyle Evans.Xr jail 8 . 140*d694059fSKyle EvansThe following default parameters are provided: 141*d694059fSKyle Evans.Bl -tag -width -indent 142*d694059fSKyle Evans.It Va allow.mount Ns = Ns Ar true 143*d694059fSKyle Evans.It Va allow.mount.devfs Ns = Ns Ar true 144*d694059fSKyle Evans.It Va enforce_statfs Ns = Ns Ar 1 145*d694059fSKyle Evans.It Va name Ns = Ns Ar bootenv 146*d694059fSKyle Evans.It Va host.hostname Ns = Ns Ar bootenv 147*d694059fSKyle Evans.It Va path 148*d694059fSKyle EvansSet to a path in /tmp generated by 149*d694059fSKyle Evans.Xr libbe 8 . 150*d694059fSKyle Evans.El 151*d694059fSKyle Evans.pp 152*d694059fSKyle EvansAll default parameters may be overwritten. 1535952343eSKyle Evans.Pp 1545952343eSKyle Evans.It Ic list 1555952343eSKyle Evans.Op Fl a 1565952343eSKyle Evans.Op Fl D 1575952343eSKyle Evans.Op Fl H 1585952343eSKyle Evans.Op Fl s 1595952343eSKyle Evans.Pp 1605952343eSKyle EvansDisplays all boot environments. 1615952343eSKyle EvansThe Active field indicates whether the boot environment is active now (N); active on reboot (R); or both (NR). 1625952343eSKyle Evans.Pp 1635952343eSKyle EvansIf 1645952343eSKyle Evans.Fl a 1655952343eSKyle Evansis used, display all datasets. 1665952343eSKyle EvansIf 1675952343eSKyle Evans.Fl D 1685952343eSKyle Evansis used, display the full space usage for each boot environment, assuming all other boot environments were destroyed. 1695952343eSKyle EvansThe 1705952343eSKyle Evans.Fl H 1715952343eSKyle Evansoption is used for scripting. It does not print headers and separate fields by a single tab instead of arbitrary white space. 1725952343eSKyle EvansIf 1735952343eSKyle Evans.Fl s 1745952343eSKyle Evansis used, display all snapshots as well. 1755952343eSKyle Evans.Pp 1765952343eSKyle Evans.It Ic mount 1775952343eSKyle Evans.Ao Ar beName Ac 1785952343eSKyle Evans.Op mountpoint 1795952343eSKyle Evans.Pp 1805952343eSKyle EvansTemporarily mount the boot environment. 1815952343eSKyle EvansMount at the specified 1825952343eSKyle Evans.Ar mountpoint 1835952343eSKyle Evansif provided. 1845952343eSKyle Evans.Pp 1855952343eSKyle Evans.It Ic rename Ao Ar origBeName Ac Ao Ar newBeName Ac 1865952343eSKyle Evans.Pp 1875952343eSKyle EvansRenames the given nonactive 1885952343eSKyle Evans.Ar origBeName 1895952343eSKyle Evansto the given 1905952343eSKyle Evans.Ar newBeName 1915952343eSKyle Evans.Pp 1925952343eSKyle Evans.It Ic unmount 1935952343eSKyle Evans.Op Fl f 1945952343eSKyle Evans.Ao Ar beName Ac 1955952343eSKyle Evans.Pp 1965952343eSKyle EvansUnmount the given boot environment, if it is mounted. 1975952343eSKyle EvansSpecifying 1985952343eSKyle Evans.Fl f 1995952343eSKyle Evanswill force the unmount if busy. 2005952343eSKyle Evans.Pp 201ad765da4SKyle Evans.It Ic unjail Ao Ar jailID | jailName | beName Ac 2025952343eSKyle Evans.Pp 2035952343eSKyle EvansDestroys the jail created from the given boot environment. 2045952343eSKyle Evans.Pp 2055952343eSKyle Evans.El 2065952343eSKyle Evans.Sh EXAMPLES 2075952343eSKyle Evans.Bl -bullet 2085952343eSKyle Evans.It 2095952343eSKyle EvansTo fill in with jail upgrade example when behavior is firm. 2105952343eSKyle Evans.Pp 2115952343eSKyle Evans.Sh SEE ALSO 2125952343eSKyle Evans.Xr jail 8 , 2135952343eSKyle Evans.Xr zfs 8 , 2145952343eSKyle Evans.Xr zpool 8 2155952343eSKyle Evans.Sh HISTORY 2165952343eSKyle Evans.Nm 2175952343eSKyle Evansis based on 2185952343eSKyle Evans.Xr beadm 1 2195952343eSKyle Evansand was implemented as a project for the 2017 Summer of Code, along with 2205952343eSKyle Evans.Xr libbe 3 . 2215952343eSKyle Evans.Sh AUTHORS 2225952343eSKyle Evans.Bl -bullet 2235952343eSKyle Evans.It 2245952343eSKyle EvansKyle Kneitinger (kneitinger) 2255952343eSKyle Evans.Ar kyle@kneit.in 2265952343eSKyle Evans.Pp 2275952343eSKyle EvansCreator of 2285952343eSKyle Evans.Nm . 2295952343eSKyle Evans.It 2305952343eSKyle EvansSlawomir Wojciech Wojtczak (vermaden) 2315952343eSKyle Evans.Ar vermaden@interia.pl 2325952343eSKyle Evans.Pp 2335952343eSKyle EvansCreator and maintainer of 2345952343eSKyle Evans.Xr beadm 1 . 2355952343eSKyle Evans.It 2365952343eSKyle EvansBryan Drewery (bdrewery) 2375952343eSKyle Evans.Ar bryan@shatow.net 2385952343eSKyle Evans.Pp 2395952343eSKyle EvansWrote the original 2405952343eSKyle Evans.Xr beadm 1 2415952343eSKyle Evansmanual page that this one is derived from. 2425952343eSKyle Evans.El 243