periodic snapshot question (not sure the best settings for my scenario)

Status
Not open for further replies.

ideal2545

Dabbler
Joined
Jun 1, 2015
Messages
25
Hi Guys,

Still rather new to freenas. Just built a 6x3TB RaidZ2 and loving it. I recently learned about setting up Previous Versions in the Windows OS with Periodic Snapshots.

My issue is, I dont really know of the best way to utilize the feature where it fits our needs but doesnt chew up alot of space. Essentially I have a "Family" dataset where we store pictures and documents, now we sometimes clean up the pictures library (remove duplicates or crappy shots) and with documents, its a working area, few times a week we go there and store papers, bills spreadsheets etc.

Now if I understand the benefit of period snapshots in my case, if we accidentally delete a wrong photo or if I modify a document and realize that I need an unmodified version, I should in theory be able to go back a few days and pull up the deleted photo or unmodified document correct?

That being the case, would I just set my lifetime of a snapshot to be something like 1 week? I want to make sure I don't eat up alot of space with snapshots and I dont really know what I would do with the begin and end times and interval.

Clarification on the best way to utilize periodic snapshots would be much appreciated!!

Thanks
Jon
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Jon, I think you're mostly thinking straight.

The snapshot, as the name suggests, captures the state of your data blocks at the moment you take the snapshot. Any changes, additions, and deletions to the filesystem from that point onward could, in principle, be "undone" by a reversion to the snapshotted state. The size of the snapshots is, typically speaking, the size of the net differences that the filesystem would have to remember to get from its present state to its previous state. Thus, if you tend to only add files to your dataset (as, for example, would be the case in my "movies" dataset), and you don't modify or delete anything, well, then the snapshots will be damn near 0 in size. If you have a dataset where existing files are often changed in substantial ways (e.g., the dataset that holds my TrueCrypt volumes for my email and web profiles and stuff), then the snapshots will tend to be of fairly considerable size. If you deleted a file of size 100kB, then, the size of the files in your dataset would go down by 100kB, but the amount of referred data in your snapshot would go up by 100kB, roughly, washing it out.

A regimen that seems pretty common, in cases like yours, where the nature of the usage is such that no one expects to actually need the snapshots, is someone will keep daily snapshots with an expiration of one week, and, just because it doesn't consume much space, and for extra margin of safety, they might keep a one-per-month snapshot for say, 3 months.

The important thing to remember is that snapshots are not backups in any way, shape or form, even though they might seem like it at first glance. They are just a recipe for making the filesystem look like it looked a few hours, days, weeks, or months ago, if that were ever necessary. Yes, if you accidentally mess up a file, a snapshot will save you. If you accidentally delete a file, a snapshot will save you. If you install a piece of software in your jail that totally ruins your whole jail, yes, a snapshot will help you. But a snapshot won't help you if there is a hardware failure. A snapshot is solely for PEBKAC's or unexpected mangling of your filesystems/data from a program that you installed incorrectly or that otherwise caused problems.
 

ideal2545

Dabbler
Joined
Jun 1, 2015
Messages
25
Thanks DrKK that makes a lot sense. In terms of actually configuring a daily snapshot in the interface, it sounds like it would be as simple as setting a begin time of something like 10pm, and end time of 11pm and setting the interval at 1 day? That should basically take one snapshot everyday at 10pm?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Sure. When you set the start and end times in there, those are the times the system is PERMITTED to take such a snapshot as you specify. Generally speaking, it will take the snapshot at the first possible opportunity. So if you had daily snapshots set up, and specified, as you say, 10pm and 11pm for your endpoints, then, I expect it would take a snapshot at precisely 10pm, once per day.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Here's mine.
snapshots.jpg
 

ideal2545

Dabbler
Joined
Jun 1, 2015
Messages
25
You are awesome, thanks a lot that makes perfect sense... didn't even think to snapshot the jails I setup!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
You are awesome, thanks a lot that makes perfect sense... didn't even think to snapshot the jails I setup!
When you're new to FreeNAS and/or FreeBSD, the jails, I think, have a lot of learning curve. When I was new to this, I was damn glad on at least six or seven occasions that I could snap back my jail that I just jacked up with my incompetence/inexperience. So yes, you'll want to do that.
Snapshot the jails!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Also, I don't know how many datasets and child datasets you have, but remember, a snapshot only snaps the specified dataset, and *NOT ANY CHILD DATASETS*. If you want to snapshot any sub-datasets, you have to set those up as a separate task, or, you can snapshot the whole family tree with a "recursive" snapshot.
 

ideal2545

Dabbler
Joined
Jun 1, 2015
Messages
25
yeah... I could have definitely used a little snapshotting on a jail yesterday haha :)
 
Status
Not open for further replies.
Top