Proper Recipe For Local Mirror
Hi! What is the proper solution for a local mirror for CentOS 7 (or oven
8) repositories?
trying with rsync, while the packages are downloaded but the repodata is not and is actually impossible to be used by clients. while i try to recreate the repodata with createrepo -C -d –workers=4 ${repo}
where ${repo} is the sync destination where it contains
%arch/{Packages,repodata} directories
the clients throw errors like:
[Errno 14] HTTP Error 404 – Not Found
What am i missing?
Thanks a lot!
Adrian
4 thoughts on - Proper Recipe For Local Mirror
https://www.osradar.com/how-to-create-CentOS-8-local-repository-mirrors-with-rsync-nginx/
and for CentOS 7?
as i can see the problem is with that repodata which is no longer a problem on 8…
Thanks!!
Adrian
Hi,
The script below is how I sync CentOS to a local mirror which is then used directly by the clients, no createrepo needed.
Please note that the exclude list is something to adjust to your needs to save space and traffic. Also the $MIRRORS list should be changed to use best mirrors for your situation.
Hope this helps, Simon
—%<-
Hi!
well, thanks a lot!! due to your script i noticed that the mirror that i used does not sync the sqlite and xml files from repodata (only repomd.xml and repomd.xml.asc)
i changed the mirror and everything worked flawless :)
Thanks a lot!
Adrian