Clarificaion on Replication

Status
Not open for further replies.

KitDavis

Dabbler
Joined
Jul 16, 2011
Messages
18
Despite reading and searching, I think my understanding of how replication works is lacking a few critical pieces.

I have a FreeNAS server with some critical data. I set up a second server and created a snapshot replication task. This works fine - all of the files replicated to the new server and it is now receiving hourly snapshots. My question concerns ongoing activity.

The second server is in place for disaster recovery, but it currently contains the data as it existed on Sept 1 (the day I started the replication) and an ever increasing number of hourly snapshots. If I have a catastrophic failure of the main server a year from now, what is the process that I use to rebuild the data? If I change a file on the main server the snapshot state will be replicated to the backup server, but it I don't change the file again for the next 12 months, do I have to start with the first incremental snapshot and then restore each in turn to get the data to a current state?

As I said to start, I think I am missing an important concept.
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
Rebuild your data? No you don't rebuild it.
As long as replication goes successfully, you have a valid copy of your data on the other NAS along with all the snapshots. The snapshots represent the changes of your data back in time.
If you don't need a deleted file or a earlier version of a file/dir, you won't need to copy anything from the snapshots.
Once a file excists on the filesystem, it stays there until deleted (or moved), unaffected of how many snaps you do.
The moment you change the file and snapshot(s) taken before the change excist, the snaps will alow you to get back the older version/versions.
 

KitDavis

Dabbler
Joined
Jul 16, 2011
Messages
18
I understand that concept - and if I was using snapshots for recovery of accidentally deleted files that would be fine. My question was if I start the replication today, and a year from now I have a catastrophic failure of the main NAS what do I do to get my data back to the way it is on Sept 11, 2014? I have my secondary NAS with the data that is a year old and 8760 snapshots (one an hour for a year).

On the main NAS,. I created a new directory and saved some files in it. If I go to the secondary NAS, that directory doesn't exist, but there is a snapshot from the time I created the directory that I am sure has that information. Am I missing something or do I have a configuration issue? - my initial thought was that replication would keep the two NAS's in sync.
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
First of all, why on earth would you want to keep all the snapshots? You kan choose how long you wan't to keep them. Deleting a snapshot won't delete your data.

Second, IF replication works, that directory with files you create will get replicated to NAS2 right after the snapshot is created. As long as the timewindow of snapshot creation and replication are valid.

If it doesn't, your replication aren't working.

Example (and we assume replication works)

NAS1. I create a dataset and a CIFS share of it. Then i set up snapshot tasks and replication to NAS2.
When files/directories are created and the snapshot is taken and replicated,
i go to NAS2 and create a CIFS share of that dataset i just replicated over to NAS2.

The shares on NAS1 and NAS2 will then be identical. Ie. contains exactly the same files/dirs.

So if NAS1 goes kaboom, i will obviously have to fix it. Then i can replicate my data back from NAS2 or simply copy it share to share with windows client or whatever.

For what its worth, i do a nightly snapshot of my NAS1 wich replicates to NAS2.
All snapshots are kept for a week, except for the one taken the night sunday to monday. This i keep for 1 month.
If i ftp to my NAS'es, all Datasets are identical. They have the same amount of snapshots, and contains the same files.

I could if i wanted to, delete all snapshots on NAS2, but the Dataset would still contain exactly the same as the Dataset on NAS1, except i would not get to access earlier versions of my files/dirs on NAS2 because i deleted the snapshots.

Hope this enlightened your misunderstanding :)
 

KitDavis

Dabbler
Joined
Jul 16, 2011
Messages
18
Thanks - you answered my question - replication is not working for me as designed. While the snapshots are getting written to NAS2, the files are not being updated. I now need to figure out why the snapshots are replicating but the datasets are not.
 
Status
Not open for further replies.
Top