Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.07 KB | None | 0 0
  1. mirror.viscomp.bg:/var/storage/mirrors/debian/etc# cat ftpsync-archive.conf
  2. ########################################################################
  3. ########################################################################
  4. ## This is a sample configuration file for the ftpsync mirror script. ##
  5. ## Most of the values are commented out and just shown here for ##
  6. ## completeness, together with their default value. ##
  7. ########################################################################
  8. ########################################################################
  9.  
  10. ## Mirrorname. This is used for things like the trace file name and should always
  11. ## be the full hostname of the mirror.
  12. MIRRORNAME=`hostname -f`
  13.  
  14. ## Destination of the mirrored files. Should be an empty directory.
  15. ## CAREFUL, this directory will contain the mirror. Everything else
  16. ## that might have happened to be in there WILL BE GONE after the mirror sync!
  17. TO="/var/storage/mirrors/debian/var/archive"
  18.  
  19. ## The upstream name of the rsync share.
  20. ##
  21. ## You can find out what share names your upstream mirror supports by running
  22. ## rsync YOURUPSTREAMSERVER::
  23. ## (You might have to export RSYNC_USER/RSYNC_PASSWORD for this to work)
  24. RSYNC_PATH="debian-archive-all"
  25.  
  26. ## The host we mirror from
  27. RSYNC_HOST=ftp.de.debian.org
  28.  
  29. ## In case we need a user to access the rsync share at our upstream host
  30. #RSYNC_USER=
  31.  
  32. ## If we need a user we also need a password
  33. #RSYNC_PASSWORD=
  34.  
  35. ## Set to "true" to tunnel your rsync through stunnel.
  36. ##
  37. ## ftpsync will then use rsync's -e option to wrap the connection
  38. ## with bin/rsync-ssl-tunnel which sets up an stunnel to connect to
  39. ## RSYNC_SSL_PORT on the remote site. (This requires server
  40. ## support, obviously.)
  41. ##
  42. ## ftpsync can use either stunnel4, stunnel4-old, or socat to set up the
  43. ## encrypted tunnel.
  44. ## o stunnel4 requires at least stunnel4 version 5.15 built aginst openssl
  45. ## 1.0.2 or later such that the stunnel build supports the checkHost
  46. ## service-level option. This will cause stunnel to verify both the
  47. ## peer certificate's validity and that it's actually for the host we wish
  48. ## to connect to.
  49. ## o stunnel4-old will skip the checkHost check. As such it will connect
  50. ## to any peer that is able to present a valid certificate, regardless of
  51. ## which name it is made out to.
  52. ## o socat will verify the peer certificate name only starting with version
  53. ## 1.7.3 (Debian 9.0).
  54. ## To test if things work, you can run
  55. ## RSYNC_SSL_PORT=1873 RSYNC_SSL_CAPATH=/etc/ssl/certs RSYNC_SSL_METHOD=socat rsync -e 'bin/rsync-ssl-tunnel' <server>::
  56. #RSYNC_SSL=false
  57. #RSYNC_SSL_PORT=1873
  58. #RSYNC_SSL_CAPATH=/etc/ssl/certs
  59. #RSYNC_SSL_METHOD=stunnel4
  60.  
  61. ## Groups and people responsible for this mirror. These contacts are
  62. ## used to report irregularities and problems with the mirror. They
  63. ## must actually accept mail.
  64. ## Example:
  65. ## INFO_MAINTAINER="Admins <admins@example.com>, Person <person@example.com>"
  66. #INFO_MAINTAINER=
  67.  
  68. ## Organizations sponsoring this mirror.
  69. ## Example:
  70. ## INFO_SPONSOR="Example <https://example.com>"
  71. #INFO_SPONSOR=
  72.  
  73. ## The ISO 3361-1 code of the country hosting this mirror.
  74. ## Example:
  75. ## INFO_COUNTRY=DE
  76. #INFO_COUNTRY=
  77.  
  78. ## The location this mirror is hosted in.
  79. ## Example:
  80. ## INFO_LOCATION="Example"
  81. #INFO_LOCATION=
  82.  
  83. ## Available throughput for this mirror per second.
  84. ## Example:
  85. ## INFO_THROUGHPUT=10Gb
  86. #INFO_THROUGHPUT=
  87.  
  88. ## In which directory should logfiles end up
  89. ## Note that BASEDIR defaults to $HOME, but can be set before calling the
  90. ## ftpsync script to any value you want (for example using pam_env)
  91. LOGDIR="${BASEDIR}/log"
  92.  
  93. ## Name of our own logfile.
  94. ## Note that ${NAME} is set by the ftpsync script depending on the way it
  95. ## is called. See README for a description of the multi-archive capability
  96. ## and better always include ${NAME} in this path.
  97. LOG="${LOGDIR}/${NAME}.log"
  98.  
  99. ## The script can send logs (or error messages) to a mail address.
  100. ## If this is unset it will default to the current user.
  101. #MAILTO="$LOGNAME"
  102.  
  103. ## If you do want a mail about every single sync, set this to false
  104. ## Everything else will only send mails if a mirror sync fails
  105. ERRORSONLY="true"
  106.  
  107. ## If you want the logs to also include output of rsync, set this to true.
  108. ## Careful, the logs can get pretty big, especially if it is the first mirror
  109. ## run
  110. FULLLOGS="false"
  111.  
  112. ## If you do want to exclude files from the mirror run, put --exclude statements here.
  113. ## See rsync(1) for the exact syntax, these are passed to rsync as written here.
  114. ## DO NOT TRY TO EXCLUDE ARCHITECTURES OR SUITES WITH THIS, IT WILL NOT WORK!
  115. #EXCLUDE=""
  116.  
  117. ## If you do want to exclude an architecture, this is for you.
  118. ## Use as space seperated list.
  119. ## Possible values are:
  120. ## alpha amd64 arm arm64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64
  121. ## kfreebsd-i386 m68k mipsel mips powerpc ppc64el s390 s390x sh sparc source
  122. ## eg. ARCH_EXCLUDE="alpha arm arm64 armel mipsel mips s390 sparc"
  123. ## An unset value will mirror all architectures (default!)
  124. ## Mutually exclusive with ARCH_INCLUDE.
  125. ## Notice: source must not be excluded on an official/public mirror
  126. ARCH_EXCLUDE="alpha arm arm64 armel armhf hppa hurd-i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mipsel mips64el mips powerpc ppc64el s390 s390x sh sparc"
  127.  
  128. ## If you do want to include only a set of architectures, this is for you.
  129. ## Use as space seperated list.
  130. ## Possible values are:
  131. ## alpha amd64 arm arm64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64
  132. ## kfreebsd-i386 m68k mipsel mips powerpc ppc64el s390 s390x sh sparc source
  133. ## eg. ARCH_INCLUDE="amd64 i386 source"
  134. ## An unset value will mirror all architectures (default!)
  135. ## Arch all will be included automatically if one binary arch is included.
  136. ## Mutually exclusive with ARCH_EXCLUDE.
  137. ## Notice: source needs to be included on an official/public mirror
  138. # For some reason this is not working for archive mirror....
  139. ARCH_INCLUDE="i386 amd64 source"
  140.  
  141. ## Do we have leaf mirror to signal we are done and they should sync?
  142. ## If so set it to true and make sure you configure runmirrors.mirrors
  143. ## and runmirrors.conf for your need.
  144. #HUB=false
  145.  
  146. ## We do create three logfiles for every run. To save space we rotate them, this
  147. ## defines how many we keep
  148. LOGROTATE=64
  149.  
  150. ## Our own lockfile (only one sync should run at any time)
  151. #LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}"
  152.  
  153. # Timeout for the lockfile, in case we have bash older than v4 (and no /proc)
  154. # LOCKTIMEOUT=${LOCKTIMEOUT:-3600}
  155.  
  156. ## The following file is used to make sure we will end up with a correctly
  157. ## synced mirror even if we get multiple pushes in a short timeframe
  158. #UPDATEREQUIRED="${TO}/Archive-Update-Required-${MIRRORNAME}"
  159.  
  160. ## Number of seconds to sleep before retrying to sync whenever upstream
  161. ## is found to be updating while our update is running
  162. #UIPSLEEP=1200
  163.  
  164. ## Number of times the update operation will be retried when upstream
  165. ## is found to be updating while our update is running.
  166. ## Note that these are retries, so: 1st attempt + retries = total attempts
  167. #UIPRETRIES=3
  168.  
  169. ## The trace file is used by a mirror check tool to see when we last
  170. ## had a successful mirror sync. Make sure that it always ends up in
  171. ## project/trace and always shows the full hostname.
  172. ## This is *relative* to ${TO}
  173. #TRACE="project/trace/${MIRRORNAME}"
  174.  
  175. ## The local hostname to be written to the trace file.
  176. #TRACEHOST="$(hostname -f)"
  177.  
  178. ## We sync our mirror using rsync (everything else would be insane), so
  179. ## we need a few options set.
  180. ## The rsync program
  181. RSYNC=rsync
  182.  
  183. ## Extra rsync options as defined by the local admin.
  184. ## There is no default by ftpsync.
  185. ##
  186. ## Please note that these options are added to EVERY rsync call.
  187. ## Also note that these are added at the beginning of the rsync call, as
  188. ## the very first set of options.
  189. ## Please ensure you do not add a conflict with the usual rsync options as
  190. ## shown below.
  191. # RSYNC_EXTRA=""
  192.  
  193. ## limit I/O bandwidth. Value is KBytes per second, unset or 0 means unlimited
  194. #RSYNC_BW=""
  195.  
  196. ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
  197. ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
  198. ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
  199. ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
  200.  
  201. ## Default rsync options every rsync invocation sees.
  202. #RSYNC_OPTIONS="-prltvHSB8192 --chmod=D755,F644 --timeout 3600 --stats"
  203.  
  204. ## Options the first pass gets. We do not want the Packages/Source indices
  205. ## here, and we also do not want to delete any files yet.
  206. #RSYNC_OPTIONS1="--exclude=Packages* --exclude=Sources* --exclude=Release* --exclude=InRelease --include=i18n/by-hash/** --exclude=i18n/* --exclude=ls-lR*"
  207.  
  208. ## Options the second pass gets. Now we want the Packages/Source indices too
  209. ## and we also want to delete files. We also want to delete files that are
  210. ## excluded.
  211. #RSYNC_OPTIONS2="--max-delete=40000 --delay-updates --delete --delete-excluded"
  212.  
  213. ## You may establish the connection via a web proxy by setting the environment
  214. ## variable RSYNC_PROXY to a hostname:port pair pointing to your web proxy. Note
  215. ## that your web proxy's configuration must support proxy connections to port 873.
  216. # RSYNC_PROXY=
  217.  
  218.  
  219. ## The following three options are used in case we want to "callback" the host
  220. ## we got pushed from.
  221. #CALLBACKUSER="archvsync"
  222. #CALLBACKHOST="none"
  223. #CALLBACKKEY="none"
  224.  
  225.  
  226. ## Hook scripts can be run at various places during the sync.
  227. ## Leave them blank if you don't want any
  228. ## Hook1: After lock is acquired, before first rsync
  229. ## Hook2: After first rsync, if successful
  230. ## Hook3: After second rsync, if successful
  231. ## Hook4: Right before leaf mirror triggering
  232. ## Hook5: After leaf mirror trigger, only if we have slave mirrors (HUB=true)
  233. ##
  234. ## Note that Hook3 and Hook4 are likely to be called directly after each other.
  235. ## Difference is: Hook3 is called *every* time the second rsync was successful,
  236. ## but even if the mirroring needs to re-run thanks to a second push.
  237. ## Hook4 is only effective if we are done with mirroring.
  238. #HOOK1=
  239. #HOOK2=
  240. #HOOK3=
  241. #HOOK4=
  242. #HOOK5=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement