Rsync Tasks

Status
Not open for further replies.

jem

Cadet
Joined
Jan 4, 2013
Messages
3
Hello forum.

I'm trying out FreeNAS again for the first time in a couple of years, having been running plain FreeBSD on my file server with everything configured by hand until now.

One thing I've been doing is keeping a local mirror of the centos.org repository on my file server so that I can quickly kickstart Linux VMs on my home LAN. To this end, I had a script that ran the following commands:

Code:
rsync --recursive --links --perms --times --delete --partial --no-motd --verbose \
rsync://rsync.mirrorservice.org/mirror.centos.org/7.4.1708/os/x86_64/ \
/pool2/repo/7.4.1708/os/x86_64/

rsync --recursive --links --perms --times --delete --partial --no-motd --verbose \
rsync://rsync.mirrorservice.org/mirror.centos.org/7.4.1708/updates/x86_64/ \
/pool2/repo/7.4.1708/updates/x86_64/

rsync --recursive --links --perms --times --delete --partial --no-motd --verbose \
rsync://rsync.mirrorservice.org/mirror.centos.org/7.4.1708/extras/x86_64/ \
/pool2/repo/7.4.1708/extras/x86_64/


I'm trying to work out how to do this with FreeNAS, but the terminology used in the documentation has left me unsure of how.

The docs on Rsync Tasks refer to a rsync server pulling files and an rsync client pushing files. It seems to be the specifying of "push" or "pull" that determines whether FreeNAS runs the rsync client or starts an rsync server. This doesn't fit with what I was doing. I ran the 'rsync' client program to pull files from a remote rsync server.

Is it not possible to replicate my script's behaviour through the FreeNAS GUI, or am I misunderstanding something?

Thanks for any clarification.

JM
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
You can still do your rsync command, probably just exactly the way you had it before, you just can't set it up through the rsync module in the GUI.
http://doc.freenas.org/11/tasks.html?highlight=rsync#rsync-tasks
That works fine for connections between two FreeNAS systems but for more sophisticated things like you are doing, you would need to use the cron module.
http://doc.freenas.org/11/tasks.html?highlight=rsync#cron-jobs
In there you just paste your command into the teeny tiny little text block they give you for the command and it just works.
I use it for a backup process where I use rsync to copy data between specific directories on a certain schedule.
 
  • Like
Reactions: jem

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I was going to link this earlier but the site was down. I found it in the wayback. I hope the link works...
Here is an example of how to sync between two FreeNAS systems:
https://web.archive.org/web/2017062.../how-to-sync-two-freenas-storage-using-rsync/

They are doing a two way sync between a pair of FreeNAS servers. I use a similar method to do a one way sync between my two FreeNAS servers.
Then I use the cron method to copy / move / update various individual folders on different intervals.
 
  • Like
Reactions: jem
Status
Not open for further replies.
Top