Changes between Version 1 and Version 2 of mirrors/ftp


Ignore:
Timestamp:
Jul 12, 2006, 10:06:18 PM (18 years ago)
Author:
Justin R. Knierim
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mirrors/ftp

    v1 v2  
    1414 * (Optionally) sendmail for emailing rsync notifications to yourself
    1515
    16 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@cross-lfs.org with the following info:
     16Once you have the basics setup and ready to mirror, please contact Justin Knierim at admin@cross-lfs.org with the following info:
    1717
    1818 * URL
     
    2121 * Contact Information (Name, Email Address)
    2222
    23 == The Rsync Script ==
    24 
    25 {{{
    26 #!/bin/sh
    27 # This script rsyncs a directory with a server and will log and mail the
    28 # output to a user.
    29 # Parameters are needed in this order:
    30 
    31 NAME="CLFS FTP Archive"
    32 SITE=rsync.osuosl.org
    33 MODULE=clfs
    34 LOG=/var/log/clfs_rsync
    35 LOCAL=/local/path/                              # Edit this line
    36 USER=your@email.address                         # Edit this line
    37 MAILER=/usr/sbin/sendmail                       # Edit this line, if necessary
    38 
    39 OUTPUT=`rsync -lprtz --delete ${SITE}::${MODULE} ${LOCAL} 2>&1`
    40 
    41 if [ $? = 0 ] ; then
    42     echo -e "Subject: rsync of ${NAME} OK\n" |${MAILER} ${USER};
    43     echo "Rsync of ${NAME} succeeded on" `date` >> ${LOG}
    44 else
    45     (echo -e "Subject: rsync of ${NAME} FAILED\n"; echo -e "${OUTPUT}") |${MAILER} ${USER};
    46     echo "Rsync of ${NAME} failed on" `date` >> ${LOG};
    47     echo -e "${OUTPUT}" >> ${LOG}
    48 fi
    49 }}}
     23He will then get back to you with the rsync script you need any can offer help with any questions you have.
    5024
    5125[wiki:mirrors Go back to mirrors page]