36 lines
1.3 KiB
Bash
Executable file
36 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
##
|
|
## This script is used to sync data from main download servers to
|
|
## secondary server at ibiblio.
|
|
##
|
|
|
|
RSYNC='/usr/bin/rsync'
|
|
RS_OPT="-avSHP --numeric-ids"
|
|
RS_DEADLY="--delete --delete-excluded --delete-delay --delay-updates"
|
|
ALT_EXCLUDES=""
|
|
EPL_EXCLUDES=""
|
|
FED_EXCLUDES=""
|
|
|
|
LAST_SYNC='/usr/local/bin/last-sync'
|
|
|
|
SERVER=dl.fedoraproject.org
|
|
|
|
# The Buffet.
|
|
#${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-buffet0/ /srv/pub/ | tail -n2 | logger -p local0.notice -t rsync_updates_alt_stg
|
|
|
|
# Alt
|
|
${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-alt0/ /srv/pub/alt/ | tail -n2 | logger -p local0.notice -t rsync_alt
|
|
# EPEL
|
|
${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-epel0/ /srv/pub/epel/ | tail -n2 | logger -p local0.notice -t rsync_epel
|
|
# Enchilada
|
|
${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-enchilada0/ /srv/pub/fedora/ | tail -n2 | logger -p local0.notice -t rsync_fedora
|
|
# Secondary
|
|
${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-secondary/ /srv/pub/fedora-secondary/ | tail -n2 | logger -p local0.notice -t rsync_2nd
|
|
# Archives
|
|
${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-archive/ /srv/pub/archive/ | tail -n2 | logger -p local0.notice -t rsync_archive
|
|
|
|
|
|
|
|
# Let MM know I'm all up to date
|
|
#/usr/bin/report_mirror
|