Mirror administration

Finnix, the LiveCD for system administrators
Revision as of 05:52, 15 March 2012 by Ryan Finnie (talk | contribs) (Protected "Mirror administrators" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
Jump to navigation Jump to search

This page is intended for official mirror administrators, for syncing mirrors against the master release server. If you are not a official mirror but would like to become one, please see Mirrors.

When to mirror

Mirrors must be updated daily at the very least, but hourly would be preferred. Usually the files don't change at all except before a release, so very little data will be transferred most of the time.

You can mirror any time of day, but please avoid mirroring directly on the hour. Pick a random minute in cron to do the syncs.

Directory structure

At the moment, only one rsync module is provided, finnix-releases-master. Please do not pick something something in the format "/pub/mirrors/finnix" to rsync this to, as future modules may be desired. Please use the something in the format "/pub/mirrors/finnix/releases". Almost all current mirrors have "releases" as the end directory.

Mirror script

The following script is recommended for performing the rsync itself. You do not have to apply a trace file, but it is recommended. However, you must never remove any of the files in the tree after transfer, especially the transferred trace files, as they are used by mirror monitoring scripts to determine if a mirror is out of date.


# Needed variables
HOST="$(hostname -f)"

[ "$VERBOSE" = "yes" ] && RSYNC_FLAGS="-avP"

# Perform the sync itself
rsync $RSYNC_FLAGS \
 rsync://${RSYNC_USER}@rsync-master.finnix.org/finnix-releases-master/ \

# Add a trace file.  Not needed, but highly recommended.
mkdir -p "${RSYNC_DEST}/project/trace"
TZ=UTC date > "${RSYNC_DEST}/project/trace/$HOST"