Recursive snapshots and replication

Status
Not open for further replies.

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I have a bit of mental block about snapshots and replication and need help understanding, so I have the backups I think I'm making. The guide is unclear to me about recursive snapshots:
Recursive - Select this box to take separate snapshots of the volume/dataset and each of its child datasets; if unchecked, only one snapshot is taken of the specified Volume/Dataset
I don't have this checked for any of my snapshots. Let's say I have a snapshot task for a whole volume. Everything is included in that one snapshot, right? All the child datasets? If so, why would you ever want recursive snapshots?

Replication is also mysterious to me re recursive:
Recursively replicate - if checked will also replicate child datasets
Ummm, what? Does that mean, if there are snapshots of the child datasets? Or even if there are not? Does this mean a snapshot of a volume, when replicated, will NOT include its datasets unless you check this recursive box?

Or put another way, what is the easiest and simplest way to snapshot and replicate an entire volume and its datasets, such that you can easily get something back if necessary?
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I can see why you are confused. Let me take a stab at it:
I think the option that reads:
Recursive - Select this box to take separate snapshots of the volume/dataset and each of its child datasets; if unchecked, only one snapshot is taken of the specified Volume/Dataset
is under the periodic snapshot option and only will affect snapshots that are done locally, aka "periodic snapshots". So this setting affects snapshots that are taken of your datasets (and its children if the option is selected) and then stored locally.

what you reference here:
Recursively replicate - if checked will also replicate child datasets
this applies to replication snapshots to another freenas box as you probably know. I would assume this setting tells the freenas box what to replicate.

But now that I type this all out, I can see why those could at conflict. What happens if you don't check "recursive" but then choose "recursively replicate"? Will the machine only take local snapshots of the parent datasets but then how would it replicate parents and children to the other freenas box? I'm not sure how that would work because I thought what is sent through replication is based on local snapshots. Indeed freenas requires a periodic snapshot task to be setup before replication can be setup.

:confused: Don't know if that helps. I have a setup where my main freenas box is replicating to an offsite backup-freenas box over SSH. I just checked my settings and I have both boxed checked (recursive and recursively replicate).
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Let's say I have a snapshot task for a whole volume. Everything is included in that one snapshot, right?
Wrong! The misunderstanding here is in the phrase "whole volume". In fact, you're only creating a snapshot of the top level parent dataset.

Based on my experience of command-line snapshots and replication, you need both snapshots and replication to be recursive to end up with a copy of all your data.
  • If I take a snapshot that isn't recursive, it doesn't include any child datasets.
  • If I non-recursively replicate a recursive snapshot, I'm only replicating the snapshot of the parent.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
Wrong! The misunderstanding here is in the phrase "whole volume". In fact, you're only creating a snapshot of the top level parent dataset.

Based on my experience of command-line snapshots and replication, you need both snapshots and replication to be recursive to end up with a copy of all your data.
  • If I take a snapshot that isn't recursive, it doesn't include any child datasets.
  • If I non-recursively replicate a recursive snapshot, I'm only replicating the snapshot of the parent.
Wow! If that's true, they should really make that part of the guide clearer. For snapshots, it makes it sound like one of the top dataset includes child datasets in one snapshot, but if you want those snapshots "separately", you should check the recursive box. Thanks for clearing that up.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Not sure if this is still an issue, as the replication has change quite a lot, but when I first started using it I just created a single (recursive) snapshot at the top level (/mnt/tank) and a single replication task (recursive) to another freenas box. It also copied across the system information which then caused some issues on the receiving box.

I now create several periodic snapshots (still recursive) at the next level down (/mnt/tank/dataset) and have several replication tasks (recursive) which avoids that problem, and also allows me to change the frequency of specific datasets (some I only keep a week, others for 6 months)

It works very well once it's all set-up and needs no maintenance other than a quick check every now and again to confirm everything is still working as it should.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
they should really make that part of the guide clearer
It doesn't take a huge amount of effort to improve the documentation, if you offer useful input. Just create a bug report and include your proposed improvement.
 
Status
Not open for further replies.
Top