<?xml version="1.0" encoding="utf-8" ?><transcript><text start="1.251" dur="2.21">Boot Environments.</text><text start="3.628" dur="2.628">FreeBSD has a fantastic feature</text><text start="6.756" dur="3.963">called Boot Environments,
which are like a snapshot</text><text start="11.136" dur="2.168">of your Boot Environment,</text><text start="14.264" dur="3.044">of your your operating system.</text><text start="17.308" dur="4.422">A bit of akin to it&amp;#39;s not it&amp;#39;s
there&amp;#39;s nothing like it really.</text><text start="21.73" dur="2.168">I was going to say it&amp;#39;s a bit like the</text><text start="23.898" dur="2.628">the rollback feature in Windows,
but it&amp;#39;s not even like that.</text><text start="26.818" dur="1.627">There&amp;#39;s just nothing like it.</text><text start="28.445" dur="3.837">So what this allows you to do,
which is what I use it for</text><text start="32.323" dur="3.17">mainly, is what am I doing with my hands?</text><text start="35.577" dur="2.419">What&amp;#39;s this? I don&amp;#39;t do that.</text><text start="37.996" dur="4.337">So what I use this for is
when I&amp;#39;m doing a load of system updates,</text><text start="42.917" dur="4.755">I will take a snapshot of the boot
environment to the updates.</text><text start="48.131" dur="2.878">If it goes wrong,
which nine times out of ten it doesn&amp;#39;t.</text><text start="51.009" dur="0.667">But if there&amp;#39;s,</text><text start="52.719" dur="1.752">for instance,</text><text start="54.471" dur="2.919">something I&amp;#39;m going to update with PHP</text><text start="57.974" dur="2.836">and that the application</text><text start="60.81" dur="2.002">uses PHP doesn&amp;#39;t work with say</text><text start="63.813" dur="2.253">version 8 as opposed to version 7.</text><text start="66.441" dur="3.712">I can just roll back to the other boot
environment and it still works.</text><text start="71.237" dur="3.17">So let&amp;#39;s have a look at it
and see what what it is and how it works shall we?</text><text start="75.617" dur="2.21">So looking at my terminal here,</text><text start="77.827" dur="4.088">I&amp;#39;m logged into a vanilla FreeBSD 13.1</text><text start="82.373" dur="3.879">release and let&amp;#39;s do a bectl</text><text start="86.294" dur="3.837">So there are two tools that you can use
for this, there&amp;#39;s bectl</text><text start="90.131" dur="2.795">or you can install beadm</text><text start="94.928" dur="2.919">B E A D M which gives you</text><text start="97.847" dur="2.336">less options, but it&amp;#39;s easier to use,</text><text start="100.6" dur="2.169">so it might be better
for you to use this one. So</text><text start="104.354" dur="2.169">I&amp;#39;m going to use bectl for now.</text><text start="106.523" dur="0.458">So there we go.</text><text start="106.981" dur="3.546">If we list it, it will tell you
what environments we&amp;#39;ve got at the moment.</text><text start="110.944" dur="2.335">Just the default, nice and simple</text><text start="113.738" dur="3.128">and it was created on first of the 2022.</text><text start="117.742" dur="4.588">Today
when I installed the system, fairly simple.</text><text start="123.706" dur="1.085">So let&amp;#39;s</text><text start="124.791" dur="3.795">create
one and see what we can do with that.</text><text start="128.67" dur="0.709">Should we</text><text start="130.964" dur="3.128">so, B E C T L create</text><text start="134.676" dur="3.003">and it will tell you where I&amp;#39;ve gone wrong</text><text start="137.679" dur="1.293">and the name</text><text start="139.597" dur="0.668">nice and easy.</text><text start="140.265" dur="2.002">So let&amp;#39;s go test</text><text start="144.185" dur="0.626">list.</text><text start="144.811" dur="2.127">So there&amp;#39;s our two boot environments.</text><text start="147.188" dur="3.671">So if I now install some software,</text><text start="150.859" dur="2.002">let&amp;#39;s go</text><text start="163.454" dur="1.043">install vim.</text><text start="164.497" dur="1.168">I don&amp;#39;t use vim.</text><text start="165.665" dur="2.252">It&amp;#39;s not something
I would normally install.</text><text start="169.377" dur="1.001">There we go.</text><text start="171.713" dur="1.376">So there is</text><text start="177.385" dur="1.752">That&amp;#39;s why I hate vim</text><text start="179.345" dur="1.627">can never remember the commands. Right,</text><text start="180.972" dur="2.669">So if I now look at my boot environments.</text><text start="185.435" dur="1.626">So what can I do with that?</text><text start="187.061" dur="3.629">Well, let&amp;#39;s say for argument&amp;#39;s sake, that</text><text start="191.441" dur="2.002">when I install vim,
it screws something up.</text><text start="193.693" dur="1.919">Clearly it did and it wouldn&amp;#39;t.</text><text start="195.612" dur="1.376">But what can I do?</text><text start="196.988" dur="4.546">Well, I can boot into the boot environment
that I created a few minutes ago.</text><text start="201.91" dur="2.669">Reboot. And it&amp;#39;s like it&amp;#39;s not installed.</text><text start="204.787" dur="2.795">So let&amp;#39;s do that. So, B E C T L</text><text start="208.583" dur="7.674">l there we go.</text><text start="216.382" dur="3.838">So if I do my list again
and then I reboot.</text><text start="222.138" dur="2.461">So let&amp;#39;s go to</text><text start="224.933" dur="3.753">the system to see it rebooting.</text><text start="228.686" dur="4.213">Just so that you know
that I&amp;#39;m not cheating.</text><text start="235.985" dur="0.334">Okay.</text><text start="236.319" dur="2.878">So you can see that that is now restarted.</text><text start="240.114" dur="2.419">Let&amp;#39;s go back and</text><text start="242.742" dur="6.34">restart this session, clear it </text><text start="250.083" dur="6.214">Let&amp;#39;s do a bectl list.</text><text start="257.298" dur="0.918">So there you go.</text><text start="258.216" dur="2.836">The test is now active, so</text><text start="261.052" dur="2.669">probably should have picked
some better than VI, to be honest.</text><text start="264.222" dur="3.003">So Vim and there we go, not installed</text><text start="268.268" dur="1.543">absolutely invaluable.</text><text start="269.811" dur="3.378">So if I now reactivate the default</text><text start="273.856" dur="1.669">boot environment</text><text start="283.116" dur="0.25">Helps</text><text start="283.366" dur="3.253">if I actually spell correctly.</text><text start="288.997" dur="1.042">Here we go.</text><text start="290.039" dur="3.254">So that&amp;#39;s now the one that&amp;#39;s</text><text start="293.584" dur="2.169">active and then reboot again</text><text start="297.338" dur="8.842">VIM will be installed again.</text><text start="307.849" dur="2.627">That&amp;#39;s interesting.</text><text start="311.936" dur="1.46">Dunno what happened there...</text><text start="318.109" dur="3.003">reboot not restart.</text><text start="322.697" dur="1.877">So go back to the box itself.</text><text start="324.574" dur="1.418">They got restarting.</text><text start="327.827" dur="2.669">Beep.</text><text start="330.496" dur="1.168">Up it comes</text><text start="333.958" dur="2.461">time and date</text><text start="339.005" dur="0.751">There we go.</text><text start="339.756" dur="1.251">Let&amp;#39;s restart,</text><text start="341.007" dur="2.252">restart the terminal</text><text start="343.259" dur="6.465">There we go, and</text><text start="350.892" dur="1.126">I&amp;#39;m back into that one.</text><text start="352.018" dur="3.211">So when I do vim, they go, it&amp;#39;s back.</text><text start="357.774" dur="0.959">There we go.</text><text start="360.151" dur="5.297">So there&amp;#39;s also beadm</text><text start="365.448" dur="5.297">which again, does the same thing,
but it doesn&amp;#39;t have so many of the</text><text start="371.245" dur="2.837">the switches
that you could put on the end.</text><text start="374.082" dur="1.501">So if you look at</text><text start="378.544" dur="4.088">it&amp;#39;s got more of it.</text><text start="382.632" dur="3.712">But yeah,
I find this absolutely invaluable.</text><text start="387.011" dur="2.336">I have got into the routine
now where if I&amp;#39;m doing</text><text start="389.347" dur="4.546">updates on,
make sure that I take a snapshot</text><text start="393.893" dur="3.17">of my boot environment
because I lose the server.</text><text start="397.772" dur="3.295">I&amp;#39;ve got to go on site
and I&amp;#39;ve got to fix it physically.</text><text start="401.067" dur="0.834">I don&amp;#39;t want to do that.</text><text start="403.152" dur="2.836">I&amp;#39;d much rather just be able to go,</text><text start="405.988" dur="1.21">There we go, activate that,</text><text start="407.198" dur="1.418">Let&amp;#39;s go back.</text><text start="409.033" dur="1.794">Absolutely fantastic.</text><text start="410.827" dur="5.463">So there&amp;#39;s a little insight
into boot environments on FreeBSD.</text><text start="416.958" dur="4.796">As I say, complete game changer
and totally invaluable</text><text start="421.754" dur="2.67">to what I do as a server administrator.</text><text start="424.966" dur="3.628">I&amp;#39;m sure there are more in-depth
things that you can do with it, but</text><text start="428.803" dur="4.046">for me, having a list of boot environments
that I can boot into</text><text start="433.349" dur="4.421">after I&amp;#39;ve done
some updates is just total game changer.</text><text start="438.312" dur="1.544">Hope you enjoyed this video.</text><text start="439.856" dur="2.586">Like I said, not not a</text><text start="443.526" dur="1.919">massive one, not an in-depth thing.</text><text start="445.445" dur="1.626">Just a quick look at boot environments.</text><text start="447.071" dur="3.962">on FreeBSD,
how they help me specifically.</text><text start="451.742" dur="2.753">And maybe you can start using them</text><text start="454.495" dur="1.961">just to cover your back
when you&amp;#39;re doing updates.</text><text start="457.832" dur="1.126">If you want to</text><text start="459.333" dur="2.878">hope you&amp;#39;ve enjoyed it, subscribe
for more videos.</text><text start="462.42" dur="2.377">They come out once a week in the holidays
at the moment.</text><text start="465.006" dur="2.919">And after that
will go back to twice a week.</text><text start="469.135" dur="1.46">Give it a like if you like it.</text><text start="470.595" dur="2.21">Don&amp;#39;t
forget this cool link in the description.</text><text start="474.432" dur="2.127">Tell me if you&amp;#39;re using</text><text start="476.767" dur="2.169">boot environments in the comments down
below.</text><text start="478.936" dur="4.255">Be interesting to see how many of you are
and if you&amp;#39;re using it in a specific way,</text><text start="484.275" dur="3.42">an advanced way,
let me know in the comments as always.</text><text start="488.279" dur="2.252">I&amp;#39;ll see you in next video. Take care.</text></transcript>