Storage

How do I configure RSync on FreeNAS to sync shares with a Windows NAS device?

Donovan Colbert illustrates how to create a suitable, inexpensive data replication solution for a small office or data center on a limited budget.

FreeNAS Rsync Configuration

To set up your Source FreeNAS server Rsync Configuration, log in to your source Freenas server (Figure ZZE).

Figure ZZE

Select the Services\Rsync tab. Click the Enable checkbox and click the Save and Restart button (Figure ZZF).

Figure ZZF

Select the Server tab and the Modules tab. Click the Add icon (Figure ZZG).

Figure ZZG

You'll see the Services | Rsync | Server | Module | Add window. Enter a name and a comment (I've selected "testmod" as my name and comment) and click the Browse button in Path to define your source Rsync share (Figure ZZH).

Figure ZZH

Click the share you want to sync. The path will change to reflect that path (in my case, /mnt/testshare) and then click OK (Figure ZZI).

Figure ZZI

Verify your settings and click the Add button at the bottom of the Services | Rsync | Server | Module | Add screen (Figure ZZJ).

Figure ZZJ

At the summary page, verify your settings and then click the Apply Changes button (Figure ZZK).

Figure ZZK

Select the Local tab. Click the Add Module icon (Figure ZZL).

Figure ZZL

At the Services|Rsync|Local|Add page, in Source Share, click the Browse button (Figure ZZM).

Figure ZZM

Double-click the appropriate source share, verify that the path is correct, and click OK (in my case, /mnt/Testshare) (Figure ZZN).

Figure ZZN

In the Destination Share, enter the IP address and path of the destination share in the format [ipaddress::sharepath]. In my case, my destination server was 192.168.2.31::testb. Please note that you can use FQDN if your FreeNAS is registered with your DNS server or otherwise configured to resolve (Figure ZZO).

Figure ZZO

Select your Synchronization Time preferences. I've selected every 5 minutes, every hour, every day, every month, and all weekends. Click the Add button at the bottom of the page. Click Apply Changes (Figure ZZP).

Figure ZZP

To target FreeNAS server Rsync configuration, log in to your target FreeNAS server, select Services|Rsync from the main menu. Check the Enable checkbox and click the Save and Restart button (Figure ZZQ).

Figure ZZQ

In the Services|Rsync|Client window, click the plus icon (Figure ZZR).

Figure ZZR

In Local Share, click the Browse button (Figure ZZS).

Figure ZZS

Select your target path (in my case, mountpointb) and verify the correct path (/mtn/mountpointb) for the destination Rsync path and click OK (Figure ZZT).

Figure ZZT

In the Remote Rysnc Server field, enter the source FreeNAS server (in my case, 192.168.2.30. Again, if your machine is registered with DNS, you can use FQDN). Select the Synchronization Time option that matches the settings you entered on the host machines (in my case, every 5 minutes all hours, all days, all months, and all days of the week). In Remote Module Name, enter the name of the source server module we created on the source, "testmod." Click the Add button at the bottom of the page (Figure ZZU).

Figure ZZU

Click Apply Changes (Figure ZZV).

Figure ZZV

Open up a browse session to the share on the Source FreeNAS server and the Target FreeNAS server. Drop a file into the source and wait, and if everything is set up correctly, the file should shortly appear on the target share, as well. Congratulations, you've configured an inexpensive NAS solution that does disk-to-disk data replication (Figure ZZW).

Figure ZZW

Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic's Windows Desktop newsletter, delivered every Monday and Thursday. Automatically sign up today!

About

Donovan Colbert has over 16 years of experience in the IT Industry. He's worked in help-desk, enterprise software support, systems administration and engineering, IT management, and is a regular contributor for TechRepublic. Currently, his profession...

7 comments
spage
spage

What are you you using as the rsync server on the windows platform? DeltaCopy? I'm not sure if I saw it mentioned. Thanks and sorry if I'm being obtuse.

dcolbert
dcolbert

Late update: Recently I lost a drive on the Powervault that is the target server for this solution. The Powervault NAS is such a poor solution for a redundant storage solution, that I lost redundancy on the boot drive mirror *and* the Raid 5 stripe where the replication takes place. Once I replaced the drives and rebuilt the mirror and stripe, the source FreeNAS server found the share, and immediately began copying over all the data - which was lost, despite the RAID 5, during the rebuild. I felt vulnerable when the Powervault was down, but it was this EXTRA level of replicated redundancy that prevented me from losing any data - the solution worked exactly as planned in an "almost worst case" scenario. Good thing, too - as the backup from the Powervault to tape hasn't been done in quite awhile. :)

dcolbert
dcolbert

This was a pretty sprawling and complex howto. I've read through it, and some of the paragraphs and figures do not correspond correctly. Despite this, Mark has done an incredible job at editing the pile of documentation I sent him into a cohesive, easy to follow guide to setting up a test NAS environment. If you have any questions, problems, or concerns, drop me a line here and I'll do everything I can to get you back on track or help you through any rough spots. It would probably be best to post questions here in the forum, rather than sending me a private/direct message, so that others can also benefit from reading those comments and observations. Good luck, and I hope you find this document helpful.

Mark W. Kaelin
Mark W. Kaelin

What is your NAS setup? Do you have a better NAS solution that you'd like to share?

dcolbert
dcolbert

For expert-level discussion of the full features and possibilities of the RSync utility, you may also want to check out this article: http://blogs.techrepublic.com.com/five-tips/?p=143&tag=results;CR1 by Jack Wallen. Jack really gets into the nuts and bolts at an expert level about what RSync is capable of, and goes into far more detail than this article. Once this document introduces you to the broad concept of what RSync is capable of, if you want to find out how to really make it work well for you, I highly recommend checking out the link.

Neon Samurai
Neon Samurai

Emberassingly underpowered for what I really should be doing at home but it's better than nothing. Hardware RAID1 is a minimum after having lost single drive NAS before and only trusting software raid so far. RAID10 would be preferable though Drobo's raid expanding on the fly is also very nice. If I can get my head wrapped around Bacula, I'll build a dedicated box for that eventually. (I may have to give in and rtfm)

Editor's Picks