Trouble setting up Rsync with two Freenas boxes.

Status
Not open for further replies.

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Hi,

I have two freenas boxes - Box 1 is in my sig - called Nas, box 2 FNB (freenasbackup). So I looked at the manual & am confused.

Both boxes have a user Rich - both have the same passwords, both have permissions on the datasets.

Nas - \mnt\Pool\Storage (DATA TO GET PUSHED)
FNB - \mnt\backup (LOCATION TO GET PULLED

On both boxes I clicked on Services, Rsync, Rysnc Modules, then Add Rsync Module. I named it backup & pointed the path as needed. I left the comment blank, changed the user to my username.

I allowed the host (FNB), Hit OK.

I did the same thing on FNB.

On both boxes, I went to Tasks, Rsync task, I put the correct paths, put user as Rich, added appropriate Host IP, Rsync Module, Remote Module Name was backup.

Directions were set properly & it was set for 15 minutes (which could change later).

I hit OK, closed & went to Run task. It errors out (attached).

What am I doing wrong ?

This is on the same network (local), same version of freenas, etc.

Thanks,
Rich
 

Attachments

  • rSYNC.JPG
    rSYNC.JPG
    241.5 KB · Views: 267

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Maybe that is the way to go?

My goal was to have a multi day sync of anything on my freenas (specific directories) copied to a new backup only box. The only other service running would be CIFS to access that data. I figured Rsync was the easiest way to keep files in sync on another box without looking though snapshot data and adding it to CIFS

I currently use snapshots when I realize something is missing, I goto snapshots, clone the snapshot, change permissions, then create a cifs share to access that data.

It seems easier to have Rsync setup & coping data periodically to a new source (untouched). However i cant figure out the setup.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
That sounds interesting to try - what/where can i find more info on ZFS replication?
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
So does ZFS replication replicate snapshots on another server? Where Rsync copies all data from source 1 to source 2 (depending on how you configure it)? I am a little confused.

I found this guide:

http://thesolving.com/storage/how-to-sync-two-freenas-storage-using-rsync/

Which was helpful in setting up the Rsync - I am still a little confused on the configuration though.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
So does ZFS replication replicate snapshots on another server? Where Rsync copies all data from source 1 to source 2 (depending on how you configure it)? I am a little confused.

I found this guide:

http://thesolving.com/storage/how-to-sync-two-freenas-storage-using-rsync/

Which was helpful in setting up the Rsync - I am still a little confused on the configuration though.
Replication replicates your datasets over to another server.

I find it weird that people will go find random guides on the internet and then come here to ask for help with info they got from somewhere else. Wouldn't it be better to follow the guides and documentation that we have already?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I am a little confused.
A ZFS snapshot represents the state of the filesystem as a specific point in time. Replication makes the destination filesystem match the source filesystem as it was at the time the snapshot was created. This can be done incrementally if the destination and source share an earlier snapshot, thus avoiding the need to send all the data every time.

Rsync only knows about files and folders, not filesystems. It avoids sending all the data every time by analyzing the files on source and destination. It wins when a transfer is interrupted.

If you need to preserve the full filesystem structure, you should use replication. If you only need to copy files and folders, or if you have an unreliable connection, you might prefer rsync.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
So a ZFS replication task will take an existing snapshot & replicate it into live data on another server giving two exact copies of the same data (as it currently exists)?

Freenas box 1 - dataset1
Replication task
Freenas box 2 - dataset1 (From freenas box 1) replicated

Assuming you have a daily replication task, each day you will have the entire dataset replicated to the other box?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
http://doc.freenas.org/9.10/freenas_storage.html#replication-tasks

A replication task allows you to automate the copy of ZFS snapshots to another system over an encrypted connection. This allows you to create an off-site backup of a ZFS dataset or pool.

By default, replication occurs when snapshots occur. For example, if snapshots are scheduled for every 2 hours, replication occurs every 2 hours. The initial replication can take a significant period of time, from many hours to possibly days, as the structure of the entire ZFS pool needs to be recreated on the remote system. The actual time will depend upon the size of the pool and the speed of the network. Subsequent replications will take far less time, as only the modified data will be replicated.

The “Begin” and “End” times can be used to create a window of time where replication occurs. The default times allow replication to occur at any time of the day a snapshot occurs. Change these times if snapshot tasks are scheduled during office hours but the replication itself should occur after office hours. For the “End” time, consider how long replication will take so that it finishes before the next day’s office hours begin.

Once the replication task is saved, PUSH will immediately attempt to replicate its latest snapshot to PULL. If the replication is successful, the snapshot will appear in the Storage ‣ Snapshots tab of PULL. Also, the “Last snapshot sent to remote side” and “Status” fields ofStorage ‣ Snapshots on PUSH will indicate when the last snapshot was successfully sent to that “Remote Hostname”. If the snapshot is not replicated, refer to Troubleshooting Replication for troubleshooting tips.
 
Status
Not open for further replies.
Top