If it's installed on the server, use
rsync it's build for exactly that job.
To get it bi-directional do this (quote from http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1285799008594+28353475&threadId=1278777) :
To bidirectionally sync a directory
hostB, including all the sub-directories, you would run these commands on
rsync -auz /src/foo hostB:/dest
rsync -auz hostB:/dest/foo /src
The first command pushes all the files that are newer on
The second command will pull all the files that are newer on
critical options are:
when copying, you must preserve file modification times.
-a does this and
If you want to preserve just the modification times, use
To skip any files that are newer on the destination:
-u does this.