| 1 | ######################################################################## |
| 2 | ######################################################################## |
| 3 | ## This is a sample configuration file for the ftpsync mirror script. ## |
| 4 | ## Most of the values are commented out and just shown here for ## |
| 5 | ## completeness, together with their default value. ## |
| 6 | ######################################################################## |
| 7 | ######################################################################## |
| 8 | |
| 9 | ## Mirrorname. This is used for things like the trace file and should always |
| 10 | ## be the full hostname of the mirror. |
| 11 | #MIRRORNAME=`hostname -f` |
| 12 | |
| 13 | ## Destination of the mirrored files. Should be an empty directory. |
| 14 | ## CAREFUL, this directory will contain the mirror. Everything else |
| 15 | ## that might have happened to be in there WILL BE GONE after the mirror sync! |
| 16 | #TO="/org/ftp.debian.org/ftp/" |
| 17 | |
| 18 | ## The upstream name of the rsync share. |
| 19 | #RSYNC_PATH="ftp" |
| 20 | |
| 21 | ## The host we mirror from |
| 22 | #RSYNC_HOST=some.mirror.debian.org |
| 23 | |
| 24 | ## In case we need a user to access the rsync share at our upstream host |
| 25 | #RSYNC_USER= |
| 26 | |
| 27 | ## If we need a user we also need a password |
| 28 | #RSYNC_PASSWORD= |
| 29 | |
| 30 | ## In which directory should logfiles end up |
| 31 | ## Note that BASEDIR defaults to $HOME, but can be set before calling the |
| 32 | ## ftpsync script to any value you want (for example using pam_env) |
| 33 | #LOGDIR="${BASEDIR}/log" |
| 34 | |
| 35 | ## Name of our own logfile. |
| 36 | ## Note that ${NAME} is set by the ftpsync script depending on the way it |
| 37 | ## is called. See README for a description of the multi-archive capability |
| 38 | ## and better always include ${NAME} in this path. |
| 39 | #LOG="${LOGDIR}/${NAME}.log" |
| 40 | |
| 41 | ## The script can send logs (or error messages) to a mail address. |
| 42 | ## If this is unset it will default to the local root user unless it is run |
| 43 | ## on a .debian.org machine where it will default to the mirroradm people. |
| 44 | #MAILTO="root" |
| 45 | |
| 46 | ## If you do want a mail about every single sync, set this to false |
| 47 | ## Everything else will only send mails if a mirror sync fails |
| 48 | #ERRORSONLY="true" |
| 49 | |
| 50 | ## If you want the logs to also include output of rsync, set this to true. |
| 51 | ## Careful, the logs can get pretty big, especially if it is the first mirror |
| 52 | ## run |
| 53 | #FULLLOGS="false" |
| 54 | |
| 55 | ## If you do want to exclude files from the mirror run, put --exclude statements here. |
| 56 | ## See rsync(1) for the exact syntax, these are passed to rsync as written here. |
| 57 | ## DO NOT TRY TO EXCLUDE ARCHITECTURES OR SUITES WITH THIS, IT WILL NOT WORK! |
| 58 | #EXCLUDE="" |
| 59 | |
| 60 | ## If you do want to exclude an architecture, this is for you. |
| 61 | ## Use as space seperated list. |
| 62 | ## Possible values are: |
| 63 | ## alpha, amd64, arm, armel, hppa, hurd-i386, i386, ia64, kfreebsd-amd64, |
| 64 | ## kfreebsd-i386, m68k, mipsel, mips, powerpc, s390, sh, sparc and source |
| 65 | ## eg. ARCH_EXCLUDE="alpha arm armel mipsel mips s390 sparc" |
| 66 | ## An unset value will mirror all architectures (default!) |
| 67 | #ARCH_EXCLUDE="" |
| 68 | |
| 69 | ## Do we have leaf mirror to signal we are done and they should sync? |
| 70 | ## If so set it to true and make sure you configure runmirrors.mirrors |
| 71 | ## and runmirrors.conf for your need. |
| 72 | #HUB=false |
| 73 | |
| 74 | ## We do create three logfiles for every run. To save space we rotate them, this |
| 75 | ## defines how many we keep |
| 76 | #LOGROTATE=14 |
| 77 | |
| 78 | ## Our own lockfile (only one sync should run at any time) |
| 79 | #LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}" |
| 80 | |
| 81 | # Timeout for the lockfile, in case we have bash older than v4 (and no /proc) |
| 82 | # LOCKTIMEOUT=${LOCKTIMEOUT:-3600} |
| 83 | |
| 84 | ## The following file is used to make sure we will end up with a correctly |
| 85 | ## synced mirror even if we get multiple pushes in a short timeframe |
| 86 | #UPDATEREQUIRED="${TO}/Archive-Update-Required-${MIRRORNAME}" |
| 87 | |
| 88 | ## The trace file is used by a mirror check tool to see when we last |
| 89 | ## had a successful mirror sync. Make sure that it always ends up in |
| 90 | ## project/trace and always shows the full hostname. |
| 91 | ## This is *relative* to ${TO} |
| 92 | #TRACE="project/trace/${MIRRORNAME}" |
| 93 | |
| 94 | ## We sync our mirror using rsync (everything else would be insane), so |
| 95 | ## we need a few options set. |
| 96 | ## The rsync program |
| 97 | #RSYNC=rsync |
| 98 | |
| 99 | ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! |
| 100 | ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! |
| 101 | ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! |
| 102 | ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T! |
| 103 | |
| 104 | ## limit I/O bandwidth. Value is KBytes per second, unset or 0 means unlimited |
| 105 | #RSYNC_BW="" |
| 106 | |
| 107 | ## Default rsync options every rsync invocation sees. |
| 108 | #RSYNC_OPTIONS="-prltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}" |
| 109 | |
| 110 | ## Options the first pass gets. We do not want the Packages/Source indices |
| 111 | ## here, and we also do not want to delete any files yet. |
| 112 | #RSYNC_OPTIONS1="--exclude Packages* --exclude Sources* --exclude Release* --exclude InRelease --exclude ls-lR*" |
| 113 | |
| 114 | ## Options the second pass gets. Now we want the Packages/Source indices too |
| 115 | ## and we also want to delete files. We also want to delete files that are |
| 116 | ## excluded. |
| 117 | #RSYNC_OPTIONS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded" |
| 118 | |
| 119 | ## You may establish the connection via a web proxy by setting the environment |
| 120 | ## variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy. Note |
| 121 | ## that your web proxy's configuration must support proxy connections to port 873. |
| 122 | # RSYNC_PROXY= |
| 123 | |
| 124 | |
| 125 | ## The following three options are used in case we want to "callback" the host |
| 126 | ## we got pushed from. |
| 127 | #CALLBACKUSER="archvsync" |
| 128 | #CALLBACKHOST="none" |
| 129 | #CALLBACKKEY="none" |
| 130 | |
| 131 | |
| 132 | ## Hook scripts can be run at various places during the sync. |
| 133 | ## Leave them blank if you don't want any |
| 134 | ## Hook1: After lock is acquired, before first rsync |
| 135 | ## Hook2: After first rsync, if successful |
| 136 | ## Hook3: After second rsync, if successful |
| 137 | ## Hook4: Right before leaf mirror triggering |
| 138 | ## Hook5: After leaf mirror trigger, only if we have slave mirrors (HUB=true) |
| 139 | ## |
| 140 | ## Note that Hook3 and Hook4 are likely to be called directly after each other. |
| 141 | ## Difference is: Hook3 is called *every* time the second rsync was successful, |
| 142 | ## but even if the mirroring needs to re-run thanks to a second push. |
| 143 | ## Hook4 is only effective if we are done with mirroring. |
| 144 | #HOOK1= |
| 145 | #HOOK2= |
| 146 | #HOOK3= |
| 147 | #HOOK4= |
| 148 | #HOOK5= |