Version 1 (modified by 18 years ago) (diff) | ,
---|
CLFS FTP Mirroring
How do I do it?
To host the CLFS FTP repo in your ftp mirror, you will need the following:
- FTP Server setup for anonymous FTP
- 800MB free disk space
- (Recommended) the anonymous ftp path being /pub/clfs, so our mirrors are consistent
- (Optionally) sendmail for emailing rsync notifications to yourself
The script to rsync the files is located below. You are welcome to edit it to your needs. Once you have this setup and rsyncing, please contact Justin Knierim at admin@… with the following info:
- URL
- Connection Speed
- Location (City, Country, or other location indicator)
- Contact Information (Name, Email Address)
The Rsync Script
#!/bin/sh # This script rsyncs a directory with a server and will log and mail the # output to a user. # Parameters are needed in this order: NAME="CLFS FTP Archive" SITE=rsync.osuosl.org MODULE=clfs LOG=/var/log/clfs_rsync LOCAL=/local/path/ # Edit this line USER=your@email.address # Edit this line MAILER=/usr/sbin/sendmail # Edit this line, if necessary OUTPUT=`rsync -lprtz --delete ${SITE}::${MODULE} ${LOCAL} 2>&1` if [ $? = 0 ] ; then echo -e "Subject: rsync of ${NAME} OK\n" |${MAILER} ${USER}; echo "Rsync of ${NAME} succeeded on" `date` >> ${LOG} else (echo -e "Subject: rsync of ${NAME} FAILED\n"; echo -e "${OUTPUT}") |${MAILER} ${USER}; echo "Rsync of ${NAME} failed on" `date` >> ${LOG}; echo -e "${OUTPUT}" >> ${LOG} fi