From Fedora Project Wiki

Sample Mirror Script

This page contains a very simple sample mirror script. You may want to use this more complex mirror script instead.

You will need to edit the following script so that it uses your local paths. It uses a lockfile to prevent subsequent runs of the script from trampling on an existing run.

#!/bin/sh
LOCKFILE="/path/to/locks/fedora-mirror.lock"

if [ -f $LOCKFILE ] ; then
echo "fedora-mirror.lock exists, aborting..."
exit 1
fi
touch $LOCKFILE

rsync -auv --delete --exclude videl.ics.hawaii.edu::fedora/ /path/to/local/fedora/basedirectory/

rm -f $LOCKFILE