Computer How To How To, Tutorial, Example, Review


 

run rsync as daemon

July 30, 2011 by Computer

Running rsync as a daemon is a useful way to ensure rsync performs well. Rsync is typically used with ssh, however using this approach can greatly slow down transfer speed since the data will need to be encrypted during transport. Running as a daemon will eliminate this step and ensure the data gets transferred quicker.

To run it as a daemon requires an rsyncd.conf. This will be file that one will need to create, say as /etc/rsync.conf, for example. An example of how this file looks is as follows:

[module_name]
   path = /path/to/files
   uid = username
   gid = groupname
   auth users = username
   secrets file = /etc/rsyncd.secret

Notice a rsync.secret file can be created as well so that a password can be used. This way the data remains protected.

Once the files are create one can start the rsync daemon as follows:

rsync --config=/etc/rsyncd.conf --daemon

This will run rsync as a daemon and it will run in the background until the host reboots. Be sure to add it as a service so i comes up after a reboot if needed.

Finally, data can be sent from a remote host to the rsync server using the rsync command as well:

rsync –va file.txt rsync://username@hostname/module

By default the rsync daemon uses port 873. Be sure this port is open in your firewall.


No comments yet.

RSS feed for comments on this post.

Leave a comment





The field of computers is very vast and can somtimes be extremely challenging, but also very rewarding. One will often times encounter problems that they may not have the answer to. Problems don't always have solutions, but sometimes they do. And helpting to provide some of those solutions is our mission. It is our goal to provide helpful computer how to, tutorial, example, and review for the benefit of everyone.

Terms and Disclaimer