Thursday, December 18, 2008

Backup FreeNAS using rsync to a rsync-server

It is a little bit difficult to find out how to backup data from a FreeNAS-Server to a different rsync-server. In my case I have a QNAP TS-209 configured as a rsync-server. To this NAS device, I want to backup my data once a day.

The trick is to use the LOCAL rsync configuration of FreeNAS. The rsync-server is here called 'soulcube'. 


I've configured four backup jobs. Here is the example of my photo share.


Source share - the_directory_you_want_to_backup
Destination share - servername::rsync_share

9 comments:

PiddlyD said...

Let's try to be more clear.

You're suggesting that you are backing up FROM your FreeNAS server as the SOURCE to a second NAS, named soulcube as the target, using the path:

soulcube::targetpath

Where target path is the Rsync virtual directory you've created in Rsync on soulcube, correct?

I've set mine up in the same manner, but it isn't working.

harryd said...

Do you've a error message?

Hadji said...

Thanks for this, worked when I put in the machine IP instead of the name. Time to get DNS working properly on my network.

Instead of another nas, Im backing up to an external drive on my windows 7 machine. Installed Deltacopy server, setup a virtual directory and followed your instructions. Works great. Thanks again!

gary said...

thanks for the how-to. i've followed the steps however, i got an error message as per follows:

@ERROR: auth failed on module NetBackup
sync error: error starting client-server protocol (code 5) at main.c(1506) [sender=3.0.7]

instead of QNAP, i have Synology NAS in my environment. any suggestions?

harryd said...

Gary,

no unfortunately not, but... Have you tried 'Hadjis' hint? Using the IP address instead of the DNS name?
Any information from the log files?

Maybe you want to look at this post in the FreeNAS Forum -> http://sourceforge.net/apps/phpbb/freenas/viewtopic.php?f=38&p=13589&st=0&sk=t&sd=a

And I've found the following in the synology forum

'No, the reason is not the permission for the foldr NetBackup (it is possible to assign all rights for every user) but the built-in rsync server does only allow admin to connect.'

(See http://forum.synology.com/enu/viewtopic.php?f=9&t=15576)

Do you use admin?

gary said...

thanks for the help, harryd! i've tried both DNS name and IP method. the IP method shows error message:
[2329] rsync error: error starting client-server protocol (code 5) at main.c(1506) [sender=3.0.7]

[2329] @ERROR: auth failed on module NetBackup

and DNS method shows:
[2385] rsync error: error in socket IO (code 10) at clientserver.c(122) [sender=3.0.7]

[2385] rsync: getaddrinfo: DiskStation 873: hostname nor servname provided, or not known

i've also tried the admin and shows the same error message.

i've found a topic in QNAP forum : http://forum.qnap.com/viewtopic.php?f=15&t=29365

it seems making some changes on rsyncd.conf (don't know if it's FREENAS' or Synology's) will solve the problem.

thanks again for any suggestions!

gary said...

hi harryd... finally got it working and just want to let you know.

i've made some modification on Synology's rsyncd.conf and it works. here is the modified parts:


~~
[NetBackup]
path = /var/services/NetBackup <----
comment = Network Backup Share
~~~

chang "path = /var/services/NetBackup" to "path = /volume1/NetBackup"

and it should work!

harryd said...

Gary, thanks for your follow up! And I am glad to hear you've finally made it :)

Wilsan said...

Thanks a lot. Was struggling with the same issue but with your instructions it was easy to set up.

Once again THANKS!!