#88 Mirroring a Website
Large, busy websites like Yahoo! operate a number of mirrors, separate servers that are functionally identical to the main site but are running on different hardware. While it's unlikely that you can duplicate all of their fancy setup, the basic mirroring of a website isn't too difficult with a shell script or two.
The first step is to automatically pack up, compress, and transfer a snapshot of the master website to the mirror server. This is easily done with the remotebackup script shown in Script #87, invoked nightly by cron.
Instead of sending the archive to your own mail address, however, send it to a special address named unpacker, then add a sendmail alias in /etc/aliases (or the equivalent in other mail transport ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access