Advertisement
Guest User

Untitled

a guest
May 10th, 2017
103
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. MAILTO="janprunk@gmail.com"
  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="false"
  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="true"
  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,
  64. ## m68k, mipsel, mips, powerpc, s390, sh and sparc
  65. ## eg. ARCH_EXCLUDE="alpha arm armel mipsel mips s390 sparc"
  66. ## An unset value will mirror all architectures (default!)
  67. ## ARCH_EXCLUDE="alpha arm armel hurd-i386 ia64 m68k mipsel s390 powerpc sh"
  68. ######### ARCH_EXCLUDE="alpha arm armel hppa hurd-i386 ia64 mips m68k mipsel s390 powerpc sparc"
  69.  
  70. ## Do we have leaf mirror to signal we are done and they should sync?
  71. ## If so set it to true and make sure you configure runmirrors.mirrors
  72. ## and runmirrors.conf for your need.
  73. HUB=false
  74.  
  75. ## We do create three logfiles for every run. To save space we rotate them, this
  76. ## defines how.
  77. SAVELOG="savelog -t -c 14"
  78.  
  79. ## We need to deal with lockfiles
  80. LOCKFILE="lockfile"
  81.  
  82. ## Our own lockfile (only one sync should run at any time)
  83. LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}"
  84.  
  85. ## The following file is used to make sure we will end up with a correctly
  86. ## synced mirror even if we get multiple pushes in a short timeframe
  87. UPDATEREQUIRED="${TO}/Archive-Update-Required-${MIRRORNAME}"
  88.  
  89. ## The trace file is used by a mirror check tool to see when we last
  90. ## had a successful mirror sync. Make sure that it always ends up in
  91. ## project/trace and always shows the full hostname.
  92. ## This is *relative* to ${TO}
  93. TRACE="project/trace/${MIRRORNAME}"
  94.  
  95. ## We sync our mirror using rsync (everything else would be insane), so
  96. ## we need a few options set.
  97. ## The rsync program
  98. RSYNC=rsync
  99.  
  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. ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
  104.  
  105. ## Default rsync options every rsync invocation sees.
  106. RSYNC_OPTIONS="-rltvHSB8192 -4 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}"
  107.  
  108. ## Options the first pass gets. We do not want the Packages/Source indices
  109. ## here, and we also do not want to delete any files yet.
  110. RSYNC_OPTIONS1="--exclude Packages* --exclude Sources* --exclude Release* --exclude ls-lR*"
  111.  
  112. ## Options the second pass gets. Now we want the Packages/Source indices too
  113. ## and we also want to delete files. We also want to delete files that are
  114. ## excluded.
  115. RSYNC_OPTIONS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded"
  116.  
  117. ## You may establish the connection via a web proxy by setting the environment
  118. ## variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy. Note
  119. ## that your web proxy's configuration must support proxy connections to port 873.
  120. # RSYNC_PROXY=
  121.  
  122.  
  123. ## The following three options are used in case we want to "callback" the host
  124. ## we got pushed from.
  125. #CALLBACKUSER="archvsync"
  126. #CALLBACKHOST="none"
  127. #CALLBACKKEY="none"
  128.  
  129.  
  130. ## Hook scripts can be run at various places during the sync.
  131. ## Leave them blank if you don't want any
  132. ## Hook1: After lock is acquired, before first rsync
  133. ## Hook2: After first rsync, if successful
  134. ## Hook3: After second rsync, if successful
  135. ## Hook4: Right before leaf mirror triggering
  136. ## Hook5: After leaf mirror trigger, only if we have slave mirrors (HUB=true)
  137. ##
  138. ## Note that Hook3 and Hook4 are likely to be called directly after each other.
  139. ## Difference is: Hook3 is called *every* time the second rsync was successful,
  140. ## but even if the mirroring needs to re-run thanks to a second push.
  141. ## Hook4 is only effective if we are done with mirroring.
  142. #HOOK1=
  143. #HOOK2=
  144. #HOOK3=
  145. #HOOK4=
  146. #HOOK5=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement