 So I have been promising a butter FS video for a very long time and it has been one of those videos where I've kind of just pushed it down the road because it was a very difficult video to make. But it is time for me to sit down and actually make a butter FS video. Now it's not going to be what I promised it to be way back when. This is not a tutorial and I'll explain why it's not a tutorial later on in the video. But needless to say if you were looking for a tutorial I'll leave links in the video description to a few tutorials that you can follow for various distributions. So if you want a tutorial you can head on down there and just bypass everything that I'm about to say in this video. What I want to do today is talk about what butter FS is. I want to talk about why it's good, why it's bad, why you should use it. I'll talk about some of the tools that you can use to manage it and along the way I'll sprinkle in some of my opinion on why I think that it's so good. So before we jump in if you'd leave a thumbs up on this video I'd really appreciate it. It really does help the channel so thank you so very much for doing that. So what is butter FS and actually before we talk about that let's talk about the name butter FS is not actually the name B3 FS is the name or we hear people call it just BTR FS I'm going to call it butter FS because other people call it butter FS and it just rolls off the tongue a little bit better why it's called butter FS or why I got that nickname I couldn't tell you I don't know I didn't create it so don't come into my comment sections telling me that it's not called butter FS I know that it just is one of the nicknames that it has so we're going to just move on away from that and all acknowledge that is a bad bad name but Linux and open source developers are not known to for being able to name things well so are we all that surprised no we are not so let's move on. So what actually is butter FS at its basis that the like the top level definition of what it is it's a file system similar to EXT4 EXT3 NTFS fat 32 ZFS XFS there's a ton of file systems out there butter FS is one of them however it's not just a file system it does have some features that kind of make it better than most the rest of them at least in my opinion so the primary benefit butter FS gives you is snapshots and we'll talk about what a snapshot is here just in a minute but let's dive deeper into what butter FS actually is and to explain that I have to explain what a copy and write file system actually is so butter FS is a copy and write file system and what I'm about to explain to you is probably going to sound like utter nonsense I'm going to try to do my best to explain this and just keep in mind that I've tried to record this video now approximately five times I've explained this in five different ways and none of them have actually been coherent enough for me to actually publish so we're going to we're going to hope that this time is the charm so a copy on write file system basically means that when you modify a piece of data on your drive instead of overwriting the previous version of that data it creates a copy that's the simplest way that I've discovered to say it now if you were anything like me you're probably thinking Matt why do I want this doesn't this just fill my hard drive up with needless copies of old data well yes it does and also know it doesn't basically what happens once you've made a copy of the new data is the metadata that used to point to the old version is now pointed to the new version and without the metadata pointing to that old version of the data the drive and the system can overwrite that data somewhere along the line with something new so yes that data technically does still exist until it's overwritten now there are and there's a big situation where that old data is kept and we'll talk about that here in a minute but the idea here is that the copy version which is the new modified version of the data is where the metadata is stored and that's the data that you'll interact with going forward the old version of the data just kind of stays there until it's overwritten so that's basically what copy and write means and you have to be wondering why is that good what what benefit does this way of handling data actually give me and the answer that question is a thing that we mentioned earlier snapshots snapshots is the premier feature of butter a fest there are other features as well but by far the one at least the user facing features that I care about the most and the reason why I think butterfests is so good is snapshots now what is a snapshot a snapshot basically if you keep in mind what copy and write means basically a snapshot is a set of metadata that points to the old version of the data so let's just say for example and this is a very simplified explanation you have a text file and you've opened up that text file in Vim of course and you've made some modifications you've added some some code or whatever and you save it colon w that's how you save in them in case you didn't know yeah you see you save that data and on a copy on right file system like butterfests instead of overwriting the older version of that data it's created a new copy and it's moved the metadata from pointing to the old from the old version to the new version so you have that situation in hand but the old data is actually still there what a snapshot does and what it allows you to do is basically create metadata that points to that old copy of that text file so that if you were to make a mistake in that new copy you could roll back to the old copy now obviously that's a very simplified explanation of what a snapshot is and to be honest with you it's not the best example that I could use let's use a different one with a more realistic example so let's just say you're using open Suza I highly recommend that you actually do use open Suza if you don't you know mind me moving around the microphone and making some noise in your headphones open Suza is a fantastic distribution you should definitely try it see my previous video the point here is is the open Suza uses butterfests by default it has a tool called snapper that runs every time you do an update snapper and we'll talk a little bit more about snapper later basically just makes a snapshot every time you do an update before and after it does it automatically right out of the box and the reason why it does that is let's just say you download a whole bunch of updates and it borks your system well because snapper has taken a snapshot of that previous state of your system basically your entire root directory it's taken a snapshot of that you can then boot into that old root directory and with one line while you're booted into that read-only snapshot you can roll back to it so your computer is no longer broken so if you think about that for a minute you're probably thinking wow that's a wonderful way to back up your data don't think that because snapshots are not backups and I know I'm pointing at you because I want to write this on your forehead snapshots are not backups that's the number one misconception that people have of butterfests snapshots and it's wrong okay out of the box snapshots are not backups what snapshots are are basically small portions of metadata that point to previous copies of your root file system so when a newer copy of your root file system is corrupted or can't boot or there's something wrong with it you can go back to the old version because we know that that's there and you can then reset your system to point to that version of your root file system basically allowing you to continue on using your computer when the updates have borked it in typical Linux fashion right so that is enabled if you remember back when we're talking about copy and write because the copy is created and the old version is kept now in normal times like I said back then that older version of the data is just kind of kept there there's no metadata associated with it with a snapshot there is metadata associated with it therefore that data is kept if data has metadata associated with it it's kept on your drive if there's no metadata associated with it it can be overwritten so the reason why I said that is because snapshotting allows you to keep multiple versions of your root file system on your drive at any one time so if you could for example if you wanted to and this is something that most people do when they use but our fest is create a baseline working version of their system and then immediately create a snapshot so let's just say you install Debian and you decided to set it up with butterfs and you're gonna use time shift or you're gonna use snapper one of those two tools in order to create your snapshots and manage your snapshots which I recommend that you do you can create a snapshot of your Debian system right there at the beginning and then go forth and experiment and explore and install and corrupt all your system all you want and you can create many different snapshots after that every time you do an update or install a program or whatever and if you wanted to you could go all the way back to that beginning system previous to installing all those applications or whatever and you could go right back to that beginning system and carry on from them there and start all over again if you want to now your user data would still be there because it's not a backup it's just a snapshot which is why they call it that all of that previous root file system that you can then boot into and roll back to so I hope that I've done a fairly good job of explaining what butterfs actually is and what snapshots are I will reiterate that snapshots are not backups if you're going to treat them as backups you're going to end up as a sad sad little person because you're going to lose data and you'll just be very very upset about that and then you're going to come back to me and tell me Matt I've been using butterfs but I lost all of my pictures and my the pictures of my children and all this that's all gone why didn't you tell me that snapshots aren't backups I did tell you that I told you multiple times don't blame me when it happens so you still have to do backups okay now there is a scenario where you can use butterfs to back up your system but you have to do that explicitly and it's not a great way to back up your system it's just not okay it works very very well for the root file system it works very very well for small pieces of data and the reason why that's the case is because it works really well with and really fast with those pieces of data right and you want it to be things that your system depends on not just random pictures of whatever or documents or whatever right now you can do that like if you have a documents folder you could create a subvolume for your documents and create snapshots of those that's a reasonable thing to do but don't rely on it as your sole backup system because at its base again you can say it with me snapshots are not backups so just to get that warning out there snapshots are by far the premier feature of butterfs as I've been saying and the reason why they're good and just to go back to our example is that if you were to do an update where you're something in your root file system or an application that you installed or some update or whatever you know let's just say you do let's just say for example we'll just give you another example for whatever reason you decided it was a fantastic idea to delete your Etsy file let's just say you decided that was a good idea let's see what happened you know well obviously your system would no longer boot that's what would happen if you had a snapshot of your system prior to you being a moron sorry you could roll back to your system with an Etsy file already there because that snapshot included the file before you deleted it you can just roll back to it and you could carry on and pretend that it never happened which I highly suggest that you actually do if you deleted your Etsy file you should definitely pretend that you never actually did that and definitely never tell anybody that you did it unless you did it like on purpose just for fun or somebody dared you or whatever you do you is what they say anyways that's another example of why snapshots are good so that all explains why you should use butterfs butterfs if it's set up properly is a tool that you can use to to enable snapshotting of your system so that if something were to go wrong you could roll back to a working version of your system butterfs is one of the things that enables things like immutable distros now not all immutable distros use butterfs but quite a few of them do and the basic idea of an immutable system is that if something goes wrong you can roll back butterfs is one of the things enables them to do that right so the primary reason to use butterfs is because of snapshotting now all that stuff sounded very technical but also very positive for the most part right why wouldn't everybody use this if it's so awesome and you could you should you can just do whatever you want like delete your Etsy file and roll back and pretend it never happened why doesn't everybody do this it's basically a time machine to a working version of your system why doesn't every distribution use it well there are some reasons why you shouldn't use butterfs and we're going to talk about those so first off as you can tell and throughout the cool content of this video butterfs is a complicated file system okay now the reason why I say that isn't because normal people can't use it but mostly because it's not a set up and forget kind of thing right whereas if you install you know arch Linux with ext4 as your file system you just use it right you don't have to deal with anything file system related probably ever right you just use it it doesn't have any special features it just stores your data it's very very stable and you go about doing your normal arch based Linux things right butterfests isn't like that yes there are distributions that come with butterfs out of the box yes there are distributions that come with butterfs set up properly out of the box I'm looking at open SUSE as the primary example of that but there are a few others but for the most part if you want to actually take advantage of the tools that butterfs enables primarily snapshots you need to be able to first know that those things are enabled if they're enabled out of the box also you need to know how to use them and create them and roll back to a certain version of your system you need to know how to how to do all that and it can be complicated it's not a just oh my goodness I made a mistake and I can roll back with a single command and technically it is a single command but you have to have actually done the work in order to enable that single command to work so just for example let's talk about snapper snapper is a tool that allows you to take snapshots every time you do an update or even if every time you install a program right that's basically what snapper is it's a it's a tool it also comes with several sub tools or it has several sub packages that you can install that will create entries inside of your boot menu now most people use rub is their boot menu some people use system debut whatever boot menu you use you can with certain tools that come along with snapper create entries inside of that boot menu that'll make it basically allow you to boot into previous versions of your system previous versions of your root file system I should say so if you wanted to go back before you did an update snapper will have created that snapshot and with the certain tools you can use you can actually boot into that snapshot which will be read only and then you can use one single command to roll back to that file system so you know it's working because you're there using it but you need to do that extra command in order to roll back but if you didn't do any of that setup work if you didn't install snapper if you didn't get it set up properly if you didn't install the packages that create the boot menu entries if you didn't do any of that stuff you can be using butterfs and have none of the benefits of butterfs that's one of the reasons why this is not a tutorial okay because not only do you have to do all those extra steps in order to get butterfs to function at its full potential but it's different on every single distribution so fedora does butterfs differently than openSUSE it does they both use butterfs out of the box they both create snapshots every time you do an update but they do them differently they both create sub volumes which is basically and I'm gonna get chewed out for explaining sub volumes like this but they're basically partitions they're not exactly the same they're mountable points on your system associated with butterfs chunks that's basically the way that they explain it you don't really need to know in this situation what a sub volume is because it's not a tutorial but just the point is is that both openSUSE and fedora do sub volumes differently they handle their snapshots differently and those are the two primary distributions that use butterfs out of the box those are the two like shining examples I have of butterfs usage the only other one that really does it really really well is arco linux arco linux if you choose butterfs out of the box will actually set up snapper for you it will set up the boot menu for you so you can boot into previous versions of your operating system and all that stuff those are the only three true examples of out-of-the-box usage of butterfs every other distribution you are required to do it manually so for example on Debian yes you can in the Debian installer choose butterfs as your file system but if you don't take the extra steps to do it properly it's gonna do do you absolutely no good so you actually have to get out during the install process if you want to do it properly on butterfs or for butterfs you have to get out of the installer go into the TTY you have to unmount the current mount points for where the ISO is pointing you have to create new mount points you have to create the sub volumes that you need to create in order for things to work so you need to create your home sub volume you need to create your root sub volume all the stuff you need to edit the etsy slash fstab file in order to actually have those things mounted upon boot once everything's done it's a process right and I just vaguely described that process and that's just the Debian way of doing it doing it on a boot to slightly different doing it on a art space distribution would be slightly different and so you guys get the idea why this is not a tutorial every single distribution does it a little bit differently and that's also another reason why you shouldn't use butterfs now I'm not saying that butterfs isn't good and I personally say everybody should use it but you have to know going in that it is very distro dependent on how it works how it's set up sometimes it's a fully manual process meaning that everything that you need to do in order to get to work is reliant on you doing that work some distros like openSUSA do it for you some distros like fedora do it for you but do it in a different way some you know you get the idea right so that's the probably the primary reason why butterfs isn't for everyone but there are a couple other ones and it is very important for me to say this butterfs is listed as unstable now if I had said that at the beginning of the video nobody would have watched that's absolutely the truth because nobody wants a file system that is unstable in fact a unstable file system is like having an engine in a car that doesn't work half the time right you don't get to go from point A to point B unless your engine works probably I mean unless you're going to push it you know so an unstable file system is not a good thing but and this is a big but I've been using butterfs now for two years maybe even longer probably longer and I've never had a single time where butterfs hasn't been stable I've talked to many different people who use butterfs and every single one of them bar a couple of exceptions have had the exact same experience that I've had that it's a very very stable file system for you to use you can rely on it it's not like it's going to crash and start eating your data none of that stuff as far as I can tell it is a very stable file system but it is listed as unstable and they do that for a reason because it's still in development it has been around for a very long time but they're still developing it you still get updates to it quite often and there with that situation going on such as it is it means that things can go wrong so if you were to use butterfs and like I said I would say give it a try you definitely want to make sure that you have actual backups not snapshots but actual like firm pieces of data on an external hard drive that you can grab should your file system blow up in your face okay so that's the big one I probably should have led with it at the beginning but like said I wanted people actually watch this video so butterfs is listed as unstable just you should definitely know that the other thing that bothers a lot of people about butterfs is the way that stores old data after it's copied new data now that sentence doesn't probably really make sense to a lot of people but remember we talked about copy and write it has a whole bunch of old data once it's made that those copies and when new stuff is written to the sub volumes or to the disk it's overwritten on top of that data that doesn't have metadata associated with it and because and this is very not technical so I don't want to get into the technical details of why this is sometimes when you have a piece of data it's you know this big and then the new piece of data is this big and because the new piece of data is overwritten over probably old data there's still a piece of the old data that's there that is just kind of left there as a fragment right now if you remember back in the old days back in the windows days when you're using windows you're if you were a longtime computer user you probably remember having to defragment your hard drives this is kind of the same thing now you don't have to defragment because that's you know it's a SSD it's going to work out fine in the end but a lot of people don't care for the fact that there's these fragments of data being left on their desk right and it can cause some issues regarding stability as the operating system or as the file system I should say actually progresses in ages right so the more fragments you have the more really weird the data can get and sometimes it slows things down sometimes it causes errors so that is an issue now I think that they're working on it I don't know if that's something that they can solve or whatever I don't know the technical details but it's definitely something that you should keep in mind as as you go along so those are the two primary reasons why you shouldn't use butterfs now all that being said I know those are big ones right you know the instability the complicated nature of it the the fragmentation stuff all those those three reasons are big big reasons why you shouldn't use butterfs but it is so astonishingly good it is so astonishingly good to have those snapshots if especially now it's not as useful on say like Debian or Ubuntu you can use them and it can be helpful in some situations but the the primary reason of butterfs is those snapshots and you don't get a lot of updates on Debian or Ubuntu doesn't mean you don't get them and doesn't mean that snapshots can't be useful but they really shine I mean they really truly shine on a rolling release so if you're on Arch or if you're on open Suza or even Fedora even even though it's not technically a rolling release you know anywhere where you get a lot of updates and you have the potential for those updates that cause you issues a snapshot that can save your ass when those updates do cause you issues is priceless I can't even tell you that the it basically what it does is it gives you a sense of it's basically insurance it's like house insurance or car insurance you don't want to have to use it but you pay for it anyways because if you do go out and crash your car into a tree or run over a squirrel that causes you to do whatever you know you cause some major issues to your car you want to have that insurance so that you can get your car repaired that's basically what a snapshot is it enables you to have that peace of mind if something were to go wrong with your root file system where it no longer works you can go back to a snapshot that does work and continue on with your day that's what snapshots are good for it just gives you that peace of mind so that you can use your computer knowing that if something does go wrong you can continue to use it without having to actually fix the problem so that's butter a fast now I talked about why it's not a tutorial in this video but I also want to talk just briefly about some of the tools that go along with it so I talked about snapper snapper enables you to create snapshots during updates or installation of programs it is a fairly complicated tool to set up so I if you're going to want to try it out without having to go through that pain I would suggest using either open Suza tumbleweed in order to do it I'm not sure how how leap does it but I know tumbleweed does it right out of the box I'm assuming that they're the same but I don't know or arco linux arco linux if you choose butter fast from the drop down during calamari's also sets up snapper for you or at least it did and it'll out that will allow you to use it and experience the awesomeness that is snapper there are tutorials on YouTube and I'll link to a couple of them on how to set up snapper on other distributions so you can check those out the other tool that I should mention is time shift now time shift has been around for a very long time for for most of its life it was an r-sync front end so basically it was a backup tool right it now has the ability to use butter fs and it allows you to create snapshots just like snapper does only with a gooey right and it also has the ability to tie in with your boot menu so you can put into those snapshots if you need to it requires extra packages in order to do so it requires extra setup in order to do so just like snapper it can be complicated so those are the two tools that if you're going to get into this or if you're gonna jump into this rabbit hole you should definitely keep in mind engine look into now so there are a couple things that I want to talk about last and that is that I'm planning on some videos to kind of follow this up first I do want to do a tutorial on how to do this specifically on arch Linux so arch is a very major distribution I think that butter fs is probably the most useful on a rolling release like Arch and because it doesn't happen out of the box I would like to do a tutorial on how to do that so if you're interested in seeing that leave a comment in the comment section below leave a thumbs up so that I know that you want to do that another video that I want to make is talk specifically about snapper and I will basically set up snapper on a distribution and we'll talk about actually creating snapshots in that video so those are two videos that you can look forward to make sure you subscribed when those will happen I don't know but they will happen eventually so keep an eye out for those that is it for this video now this like I said was a very difficult video to make because I wanted to try to make sure I was explaining things the way they needed to be explained so I hope I did a fairly good job for that if you're confused leave a comment in the comment section below I'll try to explain or at least point you towards documentation that might explain it better than I can so comments in the comment section below questions and all that stuff you can if you haven't already leave a like on this video I'd really appreciate it it does help the channel thanks for following thanks everybody for watching you can follow me on mastodon or odyssey those links will be in the video description you can support me on patreon at patreon.com slash linux cast thanks to everybody who does support me on patreon and youtube because they're all absolutely amazing without you the channel just would not be anywhere near where it is right now so thank you so very very much for your support I truly do appreciate it just seriously thank you so very much thanks everybody for watching I'll see you next time