<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p></p>
<div>Hello Joerg,</div>
<div><br>
</div>
<div><span style="font-size:12pt">I would say to use rsync, but it appears as though Anssi has beat me to it
<span>😝, and </span>as it's the simplest method to sync. Here's the contents from my Crontab file:</span><br>
</div>
<div><br>
</div>
<div><span style="font-size:12pt">18 0,6,12,18 * * * rsync -aqzH msync.centos.org::CentOS /mirror/centos >/dev/null 2>&1</span><br>
</div>
<div>44 3,9,15,21 * * * rsync -aqzH msync.centos.org::altarch /mirror/centos-altarch >/dev/null 2>&1</div>
<div><br>
</div>
<div><span style="font-size:12pt">Two lines, and done! Our CentOS mirror updates at the 18 minutes past midnight, 6am, 12pm and 6pm. AltArch updates at 44 minutes past 3am, 9am, 3pm and 9pm. The reason I select random minutes is so that our mirror is not affected
by heavy loads and reduces our load on the master sync nodes.</span><br>
</div>
<div><br>
</div>
<div><span style="font-size:12pt">HTH,</span><br>
</div>
<div>Christopher Hawker.</div>
<br>
<p></p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> CentOS-mirror <centos-mirror-bounces@centos.org> on behalf of Anssi Johansson <avij@centosproject.org><br>
<b>Sent:</b> Wednesday, 23 May 2018 4:16:57 PM<br>
<b>To:</b> centos-mirror@centos.org<br>
<b>Subject:</b> Re: [CentOS-mirror] Reposync or rsync - What's the best for creating a local mirror</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Jörg Kastning kirjoitti 23.5.2018 klo 8.59:<br>
> Hi all,<br>
> <br>
> I'm going to create a local mirror using information found on: <br>
> <a href="https://wiki.centos.org/HowTos/CreateLocalMirror">https://wiki.centos.org/HowTos/CreateLocalMirror</a><br>
> <br>
> From the I know that I could use reposync or an rsync script to sync my <br>
> mirror. But I'm not sure what the pros and cons of either method are.<br>
> <br>
> As far as I know I have to choose one specific mirror nearby when using <br>
> rsync. If this mirror is not available I have to change my script to use <br>
> another one.<br>
> <br>
> Using reposync I guess it would choose the fastest mirror from the <br>
> configured yum repos of my installation.<br>
> <br>
> Please correct me, if I'm wrong in my assumptions.<br>
> <br>
> Maybe in the future I would like to provide a public mirror. Is there <br>
> any preferred sync method for this scenario?<br>
<br>
For public mirrors you should use rsync. reposync will not sync non-rpm <br>
files, such as .iso images. Using reposync would also break the signed <br>
metadata (repomd.xml.asc), and arranging the mirror layout would be <br>
unnecessarily difficult with reposync. Reposync doesn't know about hard <br>
links either. So the tool to use for public mirrors is rsync.<br>
<br>
For a private mirror either one will work, but I prefer using rsync for <br>
my own private mirror due to the layout matching what is on other <br>
mirrors. The upstream mirrors won't change that often, so I don't think <br>
you would need to change that URL that often. And if you're planning to <br>
provide a public mirror at some point, I'd suggest going straight to <br>
rsync and skipping reposync.<br>
<br>
If you don't need all the files from the mirrors, you can --exclude <br>
them, like --exclude '*/cloud/*'<br>
<br>
You may want to use -v --dry-run first to see which files would get <br>
transferred.<br>
_______________________________________________<br>
CentOS-mirror mailing list<br>
CentOS-mirror@centos.org<br>
<a href="https://lists.centos.org/mailman/listinfo/centos-mirror">https://lists.centos.org/mailman/listinfo/centos-mirror</a><br>
</div>
</span></font>
</body>
</html>