Temporary rsync server installation

I have recently had to make a backup of the ‘My Documents’ directory of a Windows XP user to a CentOS server.

If this was a Linux to Linux backup exercise I would automatically use rsync over ssh. However, with DeltaCopy, the most popular rsync client for Windows, setting up ssh is a bit of a faff around and it seemed much easier to set up a temporary rsync server.

On the destination (CentOS server) machine:

sudo yum install rsync
sudo nano /etc/rsyncd.conf
log file=/var/log/rsyncd

[backup]
	comment = Laptop backup
	path = /mnt/raid/homes/userid/laptop_backup
	use chroot = yes
	lock file = /var/lock/rsyncd
	read only = no
	list = yes
	uid = userid
	gid = groupid
	strict modes = yes
	ignore errors = no
	ignore nonreadable = yes
	transfer logging = yes
	dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz
sudo rsync --daemon

On the source (Windows XP) machine:

Download DeltaCopy

Extract the ZIP archive and run setup

Download UTF-8 compatible cygwin.dll and copy it over the one from deltacopy (see this link for details)

Start DeltaCopy

Create new profile specifying ‘backup‘ as the destination virtual directory

Add new scheduled task to run the backup

On the destination (CentOS server) machine:

Wait for the backup to complete, then stop the rsync server:

sudo killall rsync

If the rsync server is started automatically by xinetd or is left running for extended periods of time it is essential to also set up proper authentication and to restrict access to the host(s) that will use the service. Neither of these is provided by the configuration above.

Some further information:

http://www.server-world.info/en/note?os=CentOS_6&p=rsync
http://www.zorranlabs.com/blog/?p=82

Leave a Reply

Your email address will not be published. Required fields are marked *