rsync backup of remote NAS

Status
Not open for further replies.

calgarychris

Contributor
Joined
Aug 27, 2011
Messages
124
Hi,

I currently have a DNS-323 NAS that has photos on it that I would like to automatically backup to my new Freenas system (running 8.0.1). I am a complete noob, but I know I need to have it do an rsync "pull". The example in the documentation is written for two freenas systems, is it possible to do what I want or do you need to have a client side of rsync as well?

(edit) Also, when I am referring to the DNS, do I use the ip address (192.168.1.32) or //DNS-323/Volume_1 or some combination thereof?

Thanks
Chris
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
Can your DNS-323 schedule a "push" rsync job? If so, on the FreeNAS you would create an rsync "module" in Services, start the rsync service, then configure an rsync backup job on your DNS-323 that "pushes" data from the DNS-323 to the "module" on the FreeNAS.

Unfortunately FreeNAS has no support to "pull" data from a remote system, so if you want FreeNAS to initiate the transfer you have to resort to writing a FreeNAS shell script then scheduling it using cron.

In addition, the rsync service on FreeNAS 8.0.1 does not support ssh, and by default modules will authenticate without passwords (ie. anonymously) unless you specify restricted users/passwords via the "auth users" and "secrets file" auxiliary parameters in each rsync module you create.
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
(edit) Also, when I am referring to the DNS, do I use the ip address (192.168.1.32) or //DNS-323/Volume_1 or some combination thereof?

I would use the hostname rather than IP address, unless the IP address of the DNS-323 is a static IP address in which case it doesn't make a great deal of difference.

Using the IP address - if it's static - will always work, however if the IP address is assigned by DHCP then the hostname will be your only option (and only if your local DNS resolver is working correctly).
 

calgarychris

Contributor
Joined
Aug 27, 2011
Messages
124
I would use the hostname rather than IP address, unless the IP address of the DNS-323 is a static IP address in which case it doesn't make a great deal of difference.

Using the IP address - if it's static - will always work, however if the IP address is assigned by DHCP then the hostname will be your only option (and only if your local DNS resolver is working correctly).

Thanks - I have set up the network so that most of the components use static IPs - to me I could never figure out how to get to something using the hostname (obviously still don't!), whereas if I assign a number it's always the same...

I'm disappointed to hear that you have to write a script to do the backups, is that hard? I'm assuming that the fact that things don't use passwords isn't a big deal if it's a home network?
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
Thanks - I have set up the network so that most of the components use static IPs - to me I could never figure out how to get to something using the hostname (obviously still don't!), whereas if I assign a number it's always the same...

If you're running a local DNS cache it's usually not an issue to use hostnames, even with DHCP.

I'm disappointed to hear that you have to write a script to do the backups, is that hard?

Depends where how familiar you are with Unix and scripting! Also how sophisticated you want it to be - eg. emailing the admin in the event of a problem, or on completion etc.

In theory you should be able to create a cron job that is just the rsync command to pull the data on to the FreeNAS server (so no script involved) but if the rsync command fails for any reason you're unlikely to know about it.

I'm assuming that the fact that things don't use passwords isn't a big deal if it's a home network?

Yes, no big deal as long as your FreeNAS is not accessible outside of your home network (ie. you haven't set up any public internet access) and you trust everyone that can access the server on the home LAN.
 

calgarychris

Contributor
Joined
Aug 27, 2011
Messages
124
Thanks for your help all - much appreciated. I haven't had a chance to look at the rsync commands, but will shortly.
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
Are you sure?
I just uploaded (i.e. "pushed") some files using rsync via SSH to a remote server.

Yes. ssh isn't supported if you are using modules on the FreeNAS server, as these are using the rsync daemon. When you push files to the FreeNAS server over ssh you are not using the rsync daemon. Pushing from FreeNAS to a remote server is another matter entirely.
 
Status
Not open for further replies.
Top