June 30, 2010

Easy backup with RSync, server configuration

Now after this quick solution preview I'd like to share with you my current rsync server configuration, as I've already explained you rsync is quite easy to understand and configure, just install it in your favorite distro and configure these things:

  • /etc/rsyncd.secret file, this file contains rsync shared connection and password
  • /etc/rsyncd.conf file, this file contains rsync server configuration itself

Now let's have a look of rsycnd.secret file, it's something like:

root@myfavoritenas:/etc# cat rsyncd.secret
.... (and so on)....

this config file was taken from my current NAS, each line have two columns: share name and password, in the example above share name is "array1_backup" and password is "idonttellmypasswdtoyou", more lines may follow depending on your config. Due to security reasons you cannot read the file except if you're root, so file have chmod 0400

root@myfavoritenas:/etc# ls -la |grep rsyncd.secret
-rw------- 1 root root 368 Jul 10 2009 rsyncd.secret

Now the big part is inside rsyncd.conf, let's have a look:

root@myfavoritenas:/etc# cat rsyncd.conf
uid = root
gid = root
use chroot = yes

path = /mnt/array1/backup/.
read only = no
auth users = array1_backup
secrets file = /etc/rsyncd.secret

This config has been taken from a Buffalo TeraStation, I think you may have something similar in your favorite distro, I don't like so much buffalo configuration but this is really simple and easy to understand, I can even attach a config from your favorite distro if you like.

As you can see there's uid/gid for rsync process (don't like to see root run it), rsync chrooting, and you can see a section for each share you define (array1_backup in my example)

Next: Linux Client Configuration

Easy backup in a Windows/Linux network with RSync
Easy backup with RSync, server configuration
Easy backup with RSync, linux client configuration
Easy backup with RSync, windows client configuration


Glad to see your comments

Andrea (Ben) Benini

Click Here!