rsynch related question

Eric Ziegast ziegast at vix.com
Thu May 16 18:06:02 EST 2002


Uma asks:
>  I had a question on rsynch'ing, please do help me on this,
>  I have scenario where,I need to synch the two softwares, where
>  both the software are across the network, on different cells
>  (AFS cells).
>  For ex: first1 - /afs/tr/software , second1 - /afs/ddc/software
>  Both the softwares are same & fist1 cell will be constantly
>  updating and I need to synch this software to sencond1.  In this
>  scenario what command I should use ?

There are many ways to do it based on your needs, and from where
you want to drive the process.


#### Push using local filesystems

If both AFS trees are on the same LAN with low latency and high
bandwidth available, you can just access them directly:

	# On any server...
	cd /afs/tr/software
	rsync -ax . /afs/ddc/software


#### Push to remote server using rsh/ssh

If the AFS trees exist is different locations with significant
delay between them or not much bandwidth, then is is more efficient
to use rsync between servers at both locations to minimize
bandwidth needs between locations.  Each server (eg: TR-SERVER and
DDC-SERVER) would scann the drectory trees locally and transmit
only inventory information and changes to files over the WAN.

	# On TR-SERVER...
	cd /afs/tr/software
	rsync -ax . USER at DDC-SERVER:/afs/ddc/software

The above pushes files out using rsh.  If you want to use ssh
or a Kerberized rsh, consider "-e ssh" or "-e 'rsh -K'".

If the content is usually compressable, consider using "-z"
to save more bandwidth.


#### Suck from remote server with rsyncd

You can also suck files by setting up an rsync server on a server
at the /afs/tr node and have rsync clients on the net connect
to the server to suck down their files.

I haven't used rsyncd before, but the syntax might look something
like this:

	# On DDC-SERVER...
	cd /afs/ddc/software
	rsync -ax USER at TR-SERVER::software .


	# In /etc/rsyncd.conf on TR-SERVER...
	[software]
	path=/afs/tr/software
	... other options based on access/security ...

See the rsync(1) man page for more information about syntax with
an rsync server.  See rsyncd.conf(5) for more info about configuring
rsync servers.  There are examples on how to setup and rsync server
here:
	http://everythinglinux.org/rsync/
	http://www.freeos.com/articles/4042/


#### Suck from remote server with rsh/ssh

Another simpler way to use rsync to suck files over the network using
rsh (or ssh) is:

	# On DDC-SERVER...
	cd /afs/ddc/software
	rsync -ax [-e ssh] USER at TR-SERVER:/afs/tr/software .



There are many other command options you might consider, but they are
based more on the content than connectivity.

--
Eric Ziegast




More information about the rsync mailing list