Version 5 (modified by Justin R. Knierim, 5 years ago) (diff)


Home - News - FAQ - Download - Read - Errata - Lists - IRC - Mirrors - Bootloaders - Machine-Specifics - File Systems - CBLFS - Community - Developer

CLFS HTTP Static Mirroring

Go back to mirrors page

How do I do it?

To be a CLFS Static HTTP mirror, you will need the following:

  • Apache Webserver or equivalent
    • Options FollowSymlinks Indexes
  • 500MB free disk space
  • crontab program or similar

There 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@… with the information below. You can then be added to the mirrors list. Also should you have questions, feel free to ask.

  • URL
  • Connection Speed
  • Location (City, Country, or other location indicator)
  • Contact Information (Name, Email Address)

Website Rsync Scipt

There 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:

LOCAL=/path/to/mirror                  # Change this value                  # Change this value
MAILER=/usr/sbin/sendmail              # Change this value

[ -d "$LOCAL" ] || mkdir -p $LOCAL

OUTPUT=`rsync -clprtv --delete ${SITE}::${MODULE} ${LOCAL} 2>&1`

if [ $? -ne 0 -o `echo -e "${OUTPUT}" | wc -l` -ne 4 ] ; then
    (echo -e "Subject: mirror - Rsync Error\n"; echo -e "${OUTPUT}") | ${MAILER} ${USER};

The most basic would be just running the rsync command directly in cron or fcron:

rsync -clprt --delete /path/to/mirror

Go back to mirrors page