<div dir="ltr"><div class="gmail_default"><font face="georgia, serif">Here is what I use to sync CentOS and others (be sure to change your source for syncing from </font><span style="font-family:monospace,monospace">SRC_GATECH</span><font face="georgia, serif"> to something else</font><span style="font-family:monospace,monospace">)</span><font face="georgia, serif">:</font></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style=""><div class="gmail_default" style=""><font face="monospace, monospace">#!/bin/bash</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">lockfile=&quot;/var/lock/subsys/sync-repos/rsync_updates&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">if [ -f ${lockfile} ]; then</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;Updates via rsync already running.&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;Unable to start new repo sync, one is already running.&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>exit 0</font></div><div class="gmail_default" style=""><font face="monospace, monospace">fi</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"># Global Vars</font></div><div class="gmail_default" style=""><font face="monospace, monospace">RSYNC=&quot;`which rsync`&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">OPTS=&quot;--delay-updates --delete-delay --devices --hard-links --links --partial --perms --progress --recursive --sparse --specials --timeout=600 --times&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">DST=&quot;/storage/www/repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"># private mirror</font></div><div class="gmail_default" style=""><font face="monospace, monospace">SRC_GATECH=&quot;rsync://<a href="http://mirror.gtlib.gatech.edu">mirror.gtlib.gatech.edu</a>&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"># Where to grab Gentoo Portage tree from</font></div><div class="gmail_default" style=""><font face="monospace, monospace">SRC_PORTAGE=&quot;rsync://<a href="http://rsync.us.gentoo.org/gentoo-portage">rsync.us.gentoo.org/gentoo-portage</a>&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"># run normal or verbose</font></div><div class="gmail_default" style=""><font face="monospace, monospace">if [ &quot;$1&quot; != &quot;-v&quot; ]; then</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>OPTS=&quot;$OPTS --quiet&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">fi</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">if [ -d ${DST}/ ] ; then</font></div><div class="gmail_default" style=""><span class="" style="white-space:pre"><font face="monospace, monospace">        </font></span></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Note that we are doing an update right now</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>touch ${lockfile}</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><span class="" style="white-space:pre"><font face="monospace, monospace">        </font></span></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># CentOS Repos</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of CentOS repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${SRC_GATECH}/centos/ ${DST}/CentOS/</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># EPEL Repos</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of EPEL repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>FEDORA_OPTS=&quot;--hard-links --numeric-ids&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${FEDORA_OPTS} ${SRC_GATECH}/fedora-epel/ ${DST}/Fedora-EPEL/</font></div><div class="gmail_default" style=""><span class="" style="white-space:pre"><font face="monospace, monospace">        </font></span></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Update Fedora Mirror Manager</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Notifying Mirror Manager of updates&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>/usr/bin/report_mirror</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># ELRepo</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of ELRepo repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} rsync://<a href="http://elrepo.reloumirrors.net/elrepo">elrepo.reloumirrors.net/elrepo</a> ${DST}/ELRepo/</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Fedora</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>#MSG=&quot;Starting sync of Fedora repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">        #echo &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">        #logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>#FEDORA_OPTS=&quot;--numeric-ids&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">        #${RSYNC} ${OPTS} ${FEDORA_OPTS} ${SRC_GATECH}/fedora-enchilada ${DST}/Fedora/</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Gentoo</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of Gentoo repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>GENTOO_OPTS=&quot;--exclude=/releases/historical&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${GENTOO_OPTS} ${SRC_GATECH}/gentoo ${DST}/Gentoo</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Gentoo Portage</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of Gentoo Portage Tree&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${SRC_PORTAGE} ${DST}/gentoo-portage</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Linux Mint</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of Linux Mint repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} rsync://<a href="http://rsync-packages.linuxmint.com/packages">rsync-packages.linuxmint.com/packages</a> ${DST}/LinuxMint/packages</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># OpenCSW setup as suggested at <a href="http://www.opencsw.org/get-it/mirrors/">http://www.opencsw.org/get-it/mirrors/</a></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of OpenCSW packages&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>OPENCSW_OPTS=&quot;--hard-links&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${OPENCSW_OPTS} rsync://<a href="http://rsync.opencsw.org/opencsw/">rsync.opencsw.org/opencsw/</a> ${DST}/OpenCSW</font></div><div class="gmail_default" style=""><span class="" style="white-space:pre"><font face="monospace, monospace">        </font></span></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># RPMforge</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of RPMforge repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${SRC_GATECH}/RPMforge/* ${DST}/RPMforge/</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Puppet Labs</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of Puppet Labs repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} rsync://<a href="http://yum.puppetlabs.com/packages/*">yum.puppetlabs.com/packages/*</a> ${DST}/PuppetLabs/</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Ubuntu</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of Ubuntu releases repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${SRC_GATECH}/ubuntu-releases/* ${DST}/Ubuntu/releases/</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Starting sync of Ubuntu archive repos&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>${RSYNC} ${OPTS} ${SRC_GATECH}/ubuntu/* ${DST}/Ubuntu/archive/</font></div><div class="gmail_default" style=""><span class="" style="white-space:pre"><font face="monospace, monospace">        </font></span></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span># Cleanup</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>MSG=&quot;Syncing of repos complete&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;${MSG}&quot; </font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;${MSG}&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>/bin/rm -f ${lockfile}</font></div><div class="gmail_default" style=""><font face="monospace, monospace">else</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>echo &quot;Target directory ${DST}/ is not present.&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><span class="" style="white-space:pre">        </span>logger -t rsync &quot;Unable to sync repos, ${DST}/ is not present.&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">fi</font></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><div><br></div><div><br></div><div><br></div><div><span style="font-family:arial,helvetica,sans-serif">--</span></div><div style="color:rgb(51,102,255);font-family:tahoma,sans-serif"><font size="4"><b>Gene Liverman</b></font></div><div style="font-family:tahoma,sans-serif">Systems Integration Architect</div><div style="font-family:tahoma,sans-serif">Information Technology Services</div><div style="font-family:tahoma,sans-serif">University of West Georgia</div><div style="font-family:tahoma,sans-serif"><a href="mailto:gliverma@westga.edu" target="_blank">gliverma@westga.edu</a></div><div style="font-family:tahoma,sans-serif"><br></div><div style="font-family:tahoma,sans-serif">ITS: Making Technology Work for You!</div><div style="font-family:tahoma,sans-serif"><br><br></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Mar 28, 2016 at 6:33 AM, Ben .T.George <span dir="ltr">&lt;<a href="mailto:bentech4you@gmail.com" target="_blank">bentech4you@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">HI <div><br></div><div>thanks for the reply,</div><div><br></div><div>&quot;<span style="color:rgb(0,0,0);font-family:&#39;DejaVu Sans&#39;,&#39;Liberation Sans&#39;,sans-serif;font-size:13.6px;line-height:20.4px">We highly recommend the use of lock files in your cron script so that you don&#39;t spawn multiple connections which is hard on our servers and on your mirror.&quot;</span></div><div><span style="color:rgb(0,0,0);font-family:&#39;DejaVu Sans&#39;,&#39;Liberation Sans&#39;,sans-serif;font-size:13.6px;line-height:20.4px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:&#39;DejaVu Sans&#39;,&#39;Liberation Sans&#39;,sans-serif;font-size:13.6px;line-height:20.4px">can anyone send me sample script?</span></div><div><span style="color:rgb(0,0,0);font-family:&#39;DejaVu Sans&#39;,&#39;Liberation Sans&#39;,sans-serif;font-size:13.6px;line-height:20.4px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:&#39;DejaVu Sans&#39;,&#39;Liberation Sans&#39;,sans-serif;font-size:13.6px;line-height:20.4px">Regards,</span></div><div><span style="color:rgb(0,0,0);font-family:&#39;DejaVu Sans&#39;,&#39;Liberation Sans&#39;,sans-serif;font-size:13.6px;line-height:20.4px">Ben</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 23, 2016 at 9:21 AM, Andrew Yong <span dir="ltr">&lt;<a href="mailto:me@ndoo.sg" target="_blank">me@ndoo.sg</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><p dir="ltr"><br>
On Mar 23, 2016 14:20, &quot;Ben .T.George&quot; &lt;<a href="mailto:bentech4you@gmail.com" target="_blank">bentech4you@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; HI List,<br>
&gt;<br>
&gt; i am very new to this and we are interested in setting up country mirror from kuwait location . please anyone let me know is there any existing mirror from kuwait </p>
</span><p dir="ltr"><a href="https://www.centos.org/download/mirrors/" target="_blank">https://www.centos.org/download/mirrors/</a></p><span>
<p dir="ltr">&gt;<br>
&gt; Also help me by sending the documents/steps for setting new one.</p>
</span><p dir="ltr"><a href="https://wiki.centos.org/HowTos/CreatePublicMirrors" target="_blank">https://wiki.centos.org/HowTos/CreatePublicMirrors</a></p>
<p dir="ltr">&gt;<br>
&gt; Regards,<br>
&gt; Ben.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; CentOS-mirror mailing list<br>
&gt; <a href="mailto:CentOS-mirror@centos.org" target="_blank">CentOS-mirror@centos.org</a><br>
&gt; <a href="https://lists.centos.org/mailman/listinfo/centos-mirror" target="_blank">https://lists.centos.org/mailman/listinfo/centos-mirror</a><br>
&gt;<br>
</p>
<br>_______________________________________________<br>
CentOS-mirror mailing list<br>
<a href="mailto:CentOS-mirror@centos.org" target="_blank">CentOS-mirror@centos.org</a><br>
<a href="https://lists.centos.org/mailman/listinfo/centos-mirror" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-mirror</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
CentOS-mirror mailing list<br>
<a href="mailto:CentOS-mirror@centos.org">CentOS-mirror@centos.org</a><br>
<a href="https://lists.centos.org/mailman/listinfo/centos-mirror" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-mirror</a><br>
<br></blockquote></div><br></div></div>