RSYNC- please verify my config

Status
Not open for further replies.

dropline

Dabbler
Joined
Aug 29, 2015
Messages
25
Hi guys,

first, as I don't post much here, I want to use this opportunity to say a big THANK YOU to the community, the info on here has helped me out a lot in the past. Thanks for that!

To my issue:

I have 2 FreeNas (both 9.10, stable, newest updates) Servers in 2 locations and want to sync "location1" onto "location2" with rsync. It is set up, but before I activate it, I want to double check that everything is fine, make sure nothing important gets deleted and that rsync does what I want it to do.

Everything on "location1" has to go onto "location2", every night. After the first, full sync, I just want that all the changes made to "location1" go onto "location2". If something gets deleted on "location1", it needs to get deleted on "location2" And thats all. I dont want to sync anything from "location2" to "location1", or more important deleted from "location1"! So, no changes to "location1" at all.

My setup:

"location1" has a rsync task, see the attachment "rsync_task_loc1" which is a screenshot of all the settings.

"location2" has a rsync module setup, attachment "rsync_module_loc2" is a screenshot of all the settings.

From what I can tell, this should, at 9 pm every day, sync all the changes made to the data on "location1" to "location2".
All I have to do is tick the "activated" box for the task, and switch on the rsync service on both servers.
I have already transferred everything from "location1" onto "location2", which should be fine i guess?


Can you guys please have a look, and tell me if I am right, or if I stuffed up somewhere?

Most important thing is, that I dont want anything done to "location1", nothing deleted, nothing added, especially nothing deleted. I think I said it often enough now :)

Thank you in advance, I appreciate all input and help I get here!

rsync_module_loc2.png


rsync_task_loc1.png
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Why are you rsyncing between FreeNAS servers? ZFS replication is significantly faster and preserves ZFS properties.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I was going to ask the same thing. Rsync certainly has its applications, but if you are just sending data between two freenas boxes (any two ZFS boxes to be honest) then I'm curious why you elected NOT to go with snapshots and replication.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Expecting to have one monolithic rsync task take care of everything and work correctly first time is a bit unrealistic. Start small with a sub-folder or test dataset and work up and out from there.

Also, rsync will not span filesystems by default, which means that unless all the data on location1 is in one dataset, you will either need multiple rsync tasks or suitable items in the Extra options box.

But assuming the task is created on location1 and Direction is set to Push, there's no risk of rsync changing anything on location1 unless you insert some really unusual Extra options.
 

dropline

Dabbler
Joined
Aug 29, 2015
Messages
25
Correct me if I am wrong, but if I use zfs replication, I need to do a snapshot first. Which means I need room for the snapshot. So, I can never fill up more than 50% of my freenas, otherwise there is no more room for the snapshot? At times, we go up to 90% , while a week later it can be as low as 25%. Am I right with that assumption? I sort of doubt it myself now, after writing it down...
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
So, I can never fill up more than 50%
That is not how snapshots work. They only take up as much room as the changes made.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
ZFS snapshots aren't backups. No data blocks are copied when a snapshot is created. A snapshot only begins to consume storage when the underlying dataset is modified, because the snapshot remembers how it used to look.
At times, we go up to 90%
Sounds like you need more storage, regardless of your backup strategy.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I use Rsync to push three datasets (movies, photos, music) to my backup device. Each one is an individual rsync task. @Robert Trevellyan already stated that this must be done by dataset and I do it this way as well. I myself did not want to use snapshots but that was only because they were problematic in the early FreeNAS days and I haven't seen a need to use them for myself. Someday I'll play around with snapshots and see how wonderful they are but until then I'll survive.

I will be adding another rsync task once I squeeze some money out of my wallet for a new hard drive for my backup storage. Memorial Day sales should start soon. Daddy needs a new 4TB drive.
 
Status
Not open for further replies.
Top