[CentOS-mirror] Reposync or rsync - What's the best for creating a local mirror
Jörg Kastning
joerg.kastning at uni-bielefeld.de
Wed May 23 07:04:01 UTC 2018
Am 23.05.2018 um 08:22 schrieb Christopher Hawker:
> [...] Here's the contents from
> my Crontab file:
>
> 18 0,6,12,18 * * * rsync -aqzH msync.centos.org::CentOS /mirror/centos
> >/dev/null 2>&1
> 44 3,9,15,21 * * * rsync -aqzH msync.centos.org::altarch
> /mirror/centos-altarch >/dev/null 2>&1
[...]
> ------------------------------------------------------------------------
> *From:* CentOS-mirror <centos-mirror-bounces at centos.org> on behalf of
> Anssi Johansson <avij at centosproject.org>
> *Sent:* Wednesday, 23 May 2018 4:16:57 PM
> *To:* centos-mirror at centos.org
> *Subject:* Re: [CentOS-mirror] Reposync or rsync - What's the best for
> creating a local mirror
> Jörg Kastning kirjoitti 23.5.2018 klo 8.59:
>> Hi all,
>>
>> I'm going to create a local mirror using information found on:
>> https://wiki.centos.org/HowTos/CreateLocalMirror
>>
>> From the I know that I could use reposync or an rsync script to sync my
>> mirror. But I'm not sure what the pros and cons of either method are.
>>
>> As far as I know I have to choose one specific mirror nearby when using
>> rsync. If this mirror is not available I have to change my script to use
>> another one.
>>
>> Using reposync I guess it would choose the fastest mirror from the
>> configured yum repos of my installation.
>>
>> Please correct me, if I'm wrong in my assumptions.
>>
>> Maybe in the future I would like to provide a public mirror. Is there
>> any preferred sync method for this scenario?
>
> For public mirrors you should use rsync. reposync will not sync non-rpm
> files, such as .iso images. Using reposync would also break the signed
> metadata (repomd.xml.asc), and arranging the mirror layout would be
> unnecessarily difficult with reposync. Reposync doesn't know about hard
> links either. So the tool to use for public mirrors is rsync.
>
> For a private mirror either one will work, but I prefer using rsync for
> my own private mirror due to the layout matching what is on other
> mirrors. The upstream mirrors won't change that often, so I don't think
> you would need to change that URL that often. And if you're planning to
> provide a public mirror at some point, I'd suggest going straight to
> rsync and skipping reposync.
>
> If you don't need all the files from the mirrors, you can --exclude
> them, like --exclude '*/cloud/*'
>
> You may want to use -v --dry-run first to see which files would get
> transferred.
Thank you both vor your answers. I'm going with rsync then.
Thanks,
Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5340 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.centos.org/pipermail/centos-mirror/attachments/20180523/ce91c92d/attachment.p7s>
More information about the CentOS-mirror
mailing list