Role of Snapshots in ZFS Replication

Status
Not open for further replies.

hunter

Explorer
Joined
Nov 24, 2013
Messages
94
I have two questions: I set up snapshots and ZFS replication from my new FreeNAS server to my old FreeNAS server. (The old one is built from inexpensive spare parts and does not have ECC memory.)

  • If my new FreeNAS server were to disappear one day, could I recover all of my data from just the snapshots on the old FreeNAS server? While it looks like I can, I spent a long time with the FreeNAS documentation and got the idea that the snapshot itself, is like a differential backup (that needs the original backup to function). The documentation also says "A replication task allows you to automate the copy of ZFS snapshots..." Is "ZFS replication" truly creating a complete copy of the ZFS (in other words, the snapshots, which are required for ZFS replication, are NOT the only thing being replicated?)
I want to turn on the old FreeNAS box on once per month to receive snapshots of the production system.
  • Do I need to set the production box to keep the snapshots for more than a month? And can changes be made to the automated snapshot schedule after it has been linked to a replication task? (I went with the default 2 week snapshot retention before thinking about this question and am wondering if that was a mistake)
One more question (I know I said 2 originally):
  • Can the non-ECC memory on the old FreeNAS server, if it were to become corrupt, ever "contaminate" my production FreeNAS system using the configuration above?
Thanks in advance for any help!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
  • If my new FreeNAS server were to disappear one day, could I recover all of my data from just the snapshots on the old FreeNAS server? While it looks like I can, I spent a long time with the FreeNAS documentation and got the idea that the snapshot itself, is like a differential backup (that needs the original backup to function). The documentation also says "A replication task allows you to automate the copy of ZFS snapshots..." Is "ZFS replication" truly creating a complete copy of the ZFS (in other words, the snapshots, which are required for ZFS replication, are NOT the only thing being replicated?)
Yes. If your primary server failed, you could recover all of your data from just the snapshots.

However, Instead of a "differential" it is an "incremental". Close, but not quite the same.
  • Do I need to set the production box to keep the snapshots for more than a month? And can changes be made to the automated snapshot schedule after it has been linked to a replication task? (I went with the default 2 week snapshot retention before thinking about this question and am wondering if that was a mistake)
How long you keep snapshots is totally up to you. If they take up very little space you might want to keep a years worth(or more). As long as both servers have at least 1 snapshot that is still valid on both pools, they will stay in sync with each other. If they don't, the replication will fail and you'll have to resync the backup server to the primary(which is a PITA).
  • Can the non-ECC memory on the old FreeNAS server, if it were to become corrupt, ever "contaminate" my production FreeNAS system using the configuration above?

In theory, it might be causing corruption of your pool data on the old FreeNAS server. This corruption, if it exists, cannot be repaired and will only "contaminate" your production system in the event your backups need to be restored to the production server. So you could kind of consider your backups "slightly risky" at not being completely valid. How bad this could be depends. It could range from a file or 2 being corrupted to your replication tasks to move data back to the production server failing. It's tough to say. There's very little solid evidence on how crappy non-ECC RAM is with ZFS because (1) its impossible to read/write to a memory location in RAM and actually know its bad later(which has been a problem with arguing for/against ECC RAM in servers and desktops for years) and (2) people find out things are going bad when the pool is unmountable and they effectively have no pool.

But, as long as the flow of data is from your production server to the old server, your production server is safe. I'm not sure what your FreeNAS server is for are, but backup servers don't need to be rocket fast. Even if you build a system and don't load it up with RAM, just 8GB or even 16GB of ECC RAM,is plenty for a backup server. Even buying some old used server hardware with some old FB-DIMMs can be perfectly fine too! You just want enough to keep the server from having low-memory conditions. If this is a business server I'd strongly recommend buying something with ECC for the backup server. ;)

Edit: and the forums ate my post.. whatever, it's legible.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
I want to turn on the old FreeNAS box on once per month to receive snapshots of the production system.
  • Do I need to set the production box to keep the snapshots for more than a month? And can changes be made to the automated snapshot schedule after it has been linked to a replication task? (I went with the default 2 week snapshot retention before thinking about this question and am wondering if that was a mistake)
You can change the existing task, it won't break the replication. New snapshots will be created with the new lifetime, the already existing snapshots will be destroyed based on the setting that was in effect when they were taken.
However, you with 2 weeks retention and monthly replication the system would need to always do full replication. For incremental replication to work the sending system needs to have at least one snapshot in common with the backup system (there will be a new ZFS feature in 9.2.1 that removes this requirement, but I'm not sure if the FreeNAS replication will also be changed to use it in time for 9.2.1).
Also, switching on the backup system only to receive the replication may not be the optimal strategy as it may cause that some important activities will not get the chance to run (SMART tests, pool scrubs, ...).
 

hunter

Explorer
Joined
Nov 24, 2013
Messages
94
Cyberjock and Dusan, thank you both for the detailed answers, and for the hardware ideas for inexpensive backup with ECC memory. My backup FreeNAS box, is built in a mini-ITX case, which limits my choices a little. The case gets too warm in the summer too, someday (maybe when I come across inexpensive used parts) I'll rebuild it in another box...
It's a home server, not for business; most of the space is for media: family pictures, old super 8 movies, music collection, etc, and the contents of windows "MyDocuments" folders....
Now that I have seen the ZFS replication in action, I am really liking that feature. It's a little more expensive to have a 2nd server for that but it's one beautiful feature, especially if you keep one of them at another site syncing over a fast network.
 
Status
Not open for further replies.
Top