Snapshots | Managing TrueNAS Core

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys so today we're going to be talking about snapshots in the truenash system so what is the snapshot and why do you want trunas to be taking one well a snapshot is a copy of your data at a very very specific moment in time essentially the time that the task runs in uh trueness what do we mean by that well if you picture like a video game where you take a save point and if you go ahead in the video game and something happens you can always load that save point again you can go back to the game as it was at the time that you took the save so that's very much what a snapshot is like in the trunas system if i have a set of data in the system and i take a snapshot of it maybe on a tuesday and then later on on a wednesday i do something to that data that means that that i didn't intend to do or didn't want to to do such as delete it or screw it up or make it in some way unusable then i could always restore my uh data set back to the snapshot to how it was when i took that save off the data so it's very tempting to refer to these as like backups of the the the data uh i'm just going to be super clear these are not backups of your your data uh you have to picture this very much like a save point in a video game and imagine uh if that save point if your video game itself broke or if you lost the save then you it's not really a backup so it doesn't uh doesn't really help um you should back up your data you should you should definitely do that a snapshot is very important it's very useful uh way to roll back to a known good version of your data but it's not a backup and we'll talk about backups in another video so how do i set up a snapshot of my data well first of all we're going to log into our trunas system and then on the left hand side we'll see the option for tasks and then we've got the option for periodic snapshot tasks about halfway down so we can see we've got a couple of periodic snapshot tasks already set up for my my trunas system but we're going to set up another periodic snapshot task try to say that 10 times fast so we're going to hit the add button here on the right hand side like we always do then we're going to get prompted with a couple of different options so the first option that we get asked for is what data set that we want to to save or to take the snapshot off so unlike a lot of our other tasks like the scrub task that's run on the entire pool the snapshot task is run on a specific data set so you can choose to run it at a very high level and choose the entire media pool for example or you can go very very granular and get right into a very specific data set that you want to take the snapshot of so in this example i'm just going to do it for the media pool and i'm not going to drill down any further i want a snapshot to be taken off the entire pool so that if any of the data is lost i can roll back the whole thing so the next option that we get here is recursive and we want this to be set to yes because we don't want to just take a snapshot of the very the top level domain or a very specific set of uh of data sets we want the entire sub and child data sets to be taken a snapshot off as well that means that we can roll back a lot of different data sets if there's any sort of problem but maybe there's a use case where you don't want all of the child data sets to be kept as well and you'll be able to uncheck recursive and just take that very specific snapshot task you've also got the option to exclude some specific data sets so maybe there's a specific child's data set that changes very often or you don't care about you don't want to save and you could exclude it here for example then we've got an option for snapshot snap shot lifetime snapshot so the default here is two weeks and i'm probably going to leave it like that because two weeks is pretty good as a default but what does this snapshot lifetime mean well if i take a snapshot of my data imagine i have a data set and it is 100 gigabytes of data and i've taken a snapshot of that on a tuesday and then on a wednesday i come along and say you know what i actually don't need this data i want to delete it i'm very certain i want to delete it i hit the delete key and i get rid of that 100 gigabytes of data truenas will keep that snapshot for two weeks so i can restore and go back to that save point that snapshot of data for the next two weeks before truenas truly removes it empties the recycle bin so to speak and completely gets rid of it so the upside of that is i have a way to go back if i suddenly decide i didn't want to delete that 100 gigabytes of data the downside is even though that 100 gigabytes looks like it's disappeared to me the user uh it had it's still taking up storage space in the truenas system because this kind of snapshot test the storing the data it's not free um that 100 gigabytes will still be taken up in my storage until the snapshot expires until we we permanently empty the trash and we we don't need the snapshot anymore so that's my maybe why you don't want to store the snapshot for an entire lifetime or even for a very very long period of time i find that two weeks is more than enough most of the time i very rarely wait two weeks before i realize i shouldn't have deleted something but it can happen so whatever you're more comfortable with here some people go for four weeks six weeks and so on and some people take very very regular snapshots and then get rid of them um after a day or two uh whatever your mileage may vary whatever makes sense for your system so then we've got the naming schema so by default the the automatic name that a snapshot is given it uses the year month date hour and minute that the snapshot is taken at and that's perfect uh it makes it a very easy way to for us to navigate and understand when the snapshot is taken but maybe you wanted a task where a very specific name is given to a snapshot so that you can differentiate between them i'm not going to do that here but that is possible as well and then we're going to take a look at how often we want to run the snapshot task well say for example i do a lot of deleting or updating of the snapshot data or the media data set so i can go ahead and i can either run that daily or i can turn around and say well actually i do a lot of deleting every uh morning evening night and sometimes i want to roll back to a version that was an hour ago instead of two hours ago or three hours ago where i might get a lot of data or even last week um personally i don't make a lot of changes so i only take periodic snapshots once a week because that makes sense for me and my system but maybe you've got a very busy system and you want to make sure that you've got plenty of those snapshots to roll back to so in this example we're just going to hit the the hourly option at the start of each hour you get the options here to set a beginning and end time this helps with a little bit of granularity in case you you know want to specify some time that maybe people are heavily using the system every tuesday morning and you don't want it to run you know in the mornings or something like that we've specified to run it every hour so we wanted to run throughout the whole system but the beginning and end times here or something that would help you modify that then we've got the option to allow taking empty snapshots and uh we're going to leave this checked but the option here is it makes sure that it takes a snapshot even if nothing has changed and i like doing that because it means that i'll always have a snapshot i can roll back to even if i haven't been actively using the the data set for for quite some time so maybe i don't touch the data set for several months and then uh tomorrow i go ahead and delete something and i i want it to have been taking a fairly recent snapshot um even if i haven't actively been using it so i don't find that my latest snapshot is six months ago or something like that then you got the option to enable or disable the task i don't know why you would have a task that you didn't have enabled um there are definitely use cases where that would be the case but we're creating a new one so that's fine and then we're just going to hit the submit button here so we can see that we've now got two snapshot tasks for the media pool i had one previously that was running every tuesday basically where it would take the the snapshot and we've got another one running now and it's going to run on an hourly basis now if we just hit the expand pool on the right hand side we can see that there's a little bit of extra data here about how long the snapshots are kept for but we can't actually tell the difference between either of these snapshots we can't tell which one is the hourly one which one is the the weekly one we have to go back into the edit pool and we can see the top one is the hourly one and then if i hit cancel there and go back we can see the other one the the um the second one in line is the weekly one so um unfortunately truenas doesn't really give you the option to add a comment or a description to the periodic snapshot tasks but it does give you the option to do it for things like the scrub tasks which never really made sense for me but what's really helpful here is if you really define your snapshot tasks and take very high level ones or ones that are quite obvious uh to you but it's it's not such a big deal for you to go in and have to edit and take a look at things so where are your snapshots once they're taken and how do you roll back to them well if we go into the storage uh tab on the left hand side we'll see an option for snapshots and here you can see i've been taking snapshots for quite some time over the last couple of weeks and if i had decided that for example this is something that really happened to me very recently i wanted to roll back one of my jails the plex jail to an earlier version so you can see there's a couple of versions here as way as far back as the third of the month i was able to expand here and then i had the option to either delete the snapshot if it was taking up too much storage space clone it to a new data set if i want to take an an exact copy i also have the option to roll back and then you're given a couple of options here um and what i did here is i rolled back to an older version you've got a couple of options here to stop the rollback if there's snapshots that exist like if you've got newer snapshots or newer clones or anything like that but you've also got the option to just force override it and say that you wanted to roll back to the oldest possible version of the the snapshot which is what i wanted to do at the time i'm not going to demonstrate that but if i put no safety controls here and then confirm i'd have the option to hit roll back and then the page would load and the the data set would roll back so that's it guys that's how you would take a periodic snapshot of your data and how you would hit the roll back button to go back to a previous version of your data or a save point for your your data at this stage i'll just ask you again if you would be so kind as to do the youtube dance which is to like comment and subscribe uh that really lets the youtube algorithm know that i'm making content that people uh like to see and starts promoting me to other viewers just like you guys and it really helps out the channel otherwise i will catch you guys on the flip side
Info
Channel: Blackbeard Support
Views: 177
Rating: undefined out of 5
Keywords: Blackbeard, Support, How to, NAS, TrueNAS Core
Id: BtOGhjTrz5M
Channel Id: undefined
Length: 11min 8sec (668 seconds)
Published: Thu Sep 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.