Changes between Version 2 and Version 3 of mirrors/httpstatic


Ignore:
Timestamp:
Jul 16, 2006, 7:09:38 PM (18 years ago)
Author:
Justin R. Knierim
Comment:

Added scripts for rsyncing clfs-www

Legend:

Unmodified
Added
Removed
Modified
  • mirrors/httpstatic

    v2 v3  
    1212   * Options !FollowSymlinks Indexes
    1313 * 500MB free disk space
     14 * crontab program or similar
    1415
    15 Once you have the basics setup and ready to mirror, please contact Justin Knierim at admin@cross-lfs.org with the following info:
     16There is a script below which you can use to rsync the website and associated data to your mirror.  We recommend syncing twice an hour, at random minutes.  Once you have the mirror ready to go, please contact Justin Knierim at admin@cross-lfs.org with the information below.  You can then be added to the mirrors list.  Also should you have questions, feel free to ask.
    1617
    1718 * URL
     
    2021 * Contact Information (Name, Email Address)
    2122
    22 He will then get back to you with the rsync script you need any can offer help with any questions you have.
     23== Website Rsync Scipt ==
     24
     25There are many ways to setup the rsync of the website.  A basic bash script is shown below, which will rsync the website and email you should there be any errors:
     26
     27{{{
     28#!/bin/sh
     29
     30SITE=cross-lfs.org
     31MODULE=clfs-www
     32LOCAL=/path/to/mirror                  # Change this value
     33USER=admin@domain.com                  # Change this value
     34MAILER=/usr/sbin/sendmail              # Change this value
     35
     36[ -d "$LOCAL" ] || mkdir -p $LOCAL
     37
     38OUTPUT=`rsync -clprtv --delete ${SITE}::${MODULE} ${LOCAL} 2>&1`
     39
     40if [ $? -ne 0 -o `echo -e "${OUTPUT}" | wc -l` -ne 4 ] ; then
     41    (echo -e "Subject: cross-lfs.org mirror - Rsync Error\n"; echo -e "${OUTPUT}") | ${MAILER} ${USER};
     42fi
     43}}}
     44
     45The most basic would be just running the rsync command directly in cron or fcron:
     46
     47{{{
     48rsync -clprt --delete cross-lfs.org::clfs-www /path/to/mirror
     49}}}
    2350
    2451[wiki:mirrors Go back to mirrors page]