Advertisement
Guest User

Untitled

a guest
May 10th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.06 KB | None | 0 0
  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="debian.si.prunk.si"
  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="/home/debmir/debian"
  17.  
  18. ## The upstream name of the rsync share.
  19. RSYNC_PATH="debian"
  20.  
  21. ## The host we mirror from
  22. RSYNC_HOST="ftp.at.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.  
  45. ## If you do want a mail about every single sync, set this to false
  46. ## Everything else will only send mails if a mirror sync fails
  47. ERRORSONLY="false"
  48.  
  49. ## If you want the logs to also include output of rsync, set this to true.
  50. ## Careful, the logs can get pretty big, especially if it is the first mirror
  51. ## run
  52. FULLLOGS="true"
  53.  
  54. ## If you do want to exclude files from the mirror run, put --exclude statements here.
  55. ## See rsync(1) for the exact syntax, these are passed to rsync as written here.
  56. ## DO NOT TRY TO EXCLUDE ARCHITECTURES OR SUITES WITH THIS, IT WILL NOT WORK!
  57. #EXCLUDE=""
  58.  
  59. ## If you do want to exclude an architecture, this is for you.
  60. ## Use as space seperated list.
  61. ## Possible values are:
  62. ## alpha, amd64, arm, armel, hppa, hurd-i386, i386, ia64,
  63. ## m68k, mipsel, mips, powerpc, s390, sh and sparc
  64. ## eg. ARCH_EXCLUDE="alpha arm armel mipsel mips s390 sparc"
  65. ## An unset value will mirror all architectures (default!)
  66. ## ARCH_EXCLUDE="alpha arm armel hurd-i386 ia64 m68k mipsel s390 powerpc sh"
  67. ######### ARCH_EXCLUDE="alpha arm armel hppa hurd-i386 ia64 mips m68k mipsel s390 powerpc sparc"
  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.
  76. SAVELOG="savelog -t -c 14"
  77.  
  78. ## We need to deal with lockfiles
  79. LOCKFILE="lockfile"
  80.  
  81. ## Our own lockfile (only one sync should run at any time)
  82. LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}"
  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. ## Default rsync options every rsync invocation sees.
  105. RSYNC_OPTIONS="-rltvHSB8192 -4 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}"
  106.  
  107. ## Options the first pass gets. We do not want the Packages/Source indices
  108. ## here, and we also do not want to delete any files yet.
  109. RSYNC_OPTIONS1="--exclude Packages* --exclude Sources* --exclude Release* --exclude ls-lR*"
  110.  
  111. ## Options the second pass gets. Now we want the Packages/Source indices too
  112. ## and we also want to delete files. We also want to delete files that are
  113. ## excluded.
  114. RSYNC_OPTIONS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded"
  115.  
  116. ## You may establish the connection via a web proxy by setting the environment
  117. ## variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy. Note
  118. ## that your web proxy's configuration must support proxy connections to port 873.
  119. # RSYNC_PROXY=
  120.  
  121.  
  122. ## The following three options are used in case we want to "callback" the host
  123. ## we got pushed from.
  124. #CALLBACKUSER="archvsync"
  125. #CALLBACKHOST="none"
  126. #CALLBACKKEY="none"
  127.  
  128.  
  129. ## Hook scripts can be run at various places during the sync.
  130. ## Leave them blank if you don't want any
  131. ## Hook1: After lock is acquired, before first rsync
  132. ## Hook2: After first rsync, if successful
  133. ## Hook3: After second rsync, if successful
  134. ## Hook4: Right before leaf mirror triggering
  135. ## Hook5: After leaf mirror trigger, only if we have slave mirrors (HUB=true)
  136. ##
  137. ## Note that Hook3 and Hook4 are likely to be called directly after each other.
  138. ## Difference is: Hook3 is called *every* time the second rsync was successful,
  139. ## but even if the mirroring needs to re-run thanks to a second push.
  140. ## Hook4 is only effective if we are done with mirroring.
  141. #HOOK1=
  142. #HOOK2=
  143. #HOOK3=
  144. #HOOK4=
  145. #HOOK5=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement