|
Use RSYNC with SSHv2
The 'right' way to handle this problem is to use RSYNC with SSH, setting a trusted key on the receiving side that only permits the execution of the RSYNC command.
This method will only copy files that are new/changed, and gives an increased security, as the key cannot be used to open a shell session.
http://rsync.samba.org/
Best of all, everything you need to do can be done as a single command in a cron job, no need to rebuild the wheel with a convoluted shell script and waste cycles on tar/zip/etc.
I've done this for multi-gigabyte web sites, with a half-dozen or more mirror servers pulling updates. It's fast, reliable, low-maintenance, and when nothing changes, almost no network traffic is used.
|