• Home
  • Free Stuff
  • About
  • Contact

Making a Local Copy of openSUSE Repository (Mirror Server)

October 28, 2008

If you have a stable internet access, unlimited bandwidth and want to share the repository around the network, why don’t you building a local copy of openSUSE repository ?

Mainly, there is 3 version of openSUSE repository, oss, non oss and Packman. Oss repository contains all of open source application and the non-oss contains free application without providing source code. Open source application such as Thunderbird, Kmail and OpenOffice could be found in the oss repository, while non-oss contains Flash-Player, Acrobat Reader, etc. The last one is Packman, which contains the 3rd party application such as Clamav, multimedia package, application with special purpose (e.g Kchm), etc.

We could build a local copy of openSUSE repository by using anonymous Rsync. I strongly recommended to use another mirror as base source rather than using main download.opensuse.org. It most because the primary source often busy and our Rsync process could increase the server traffic.

Here is how to create a local copy of openSUSE repository :

OSS & Non-OSS Package

  1. Install Rsync package, by using YAST | Software | Software Management or from konsole with this command:
  2. [code language=’cpp’]zypper in rsync [/code]

  3. Check the mirror content with anonymous Rsync
  4. [code language=’cpp’]rsync ftp5.gwdg.de:: [/code]

  5. Check the content of openSUSE folder
  6. [code language=’cpp’]rsync ftp5.gwdg.de::pub/opensuse/ [/code]

  7. Making a local copy (Adjust the target folder. I’m currently using /srv/www/htdocs. Beware with the trailing slash “/” (ex : ftp5.gwdg.de::pub/opensuse/distribution/) at the end of folder on the base source URL. Adding the “/” at the end of base source means that we want to copied the CONTENT of the specified folder. If we remove the trailing slash means that we want to copy the folder)
  8. [code language=’cpp’]rsync -av –delete-after ftp5.gwdg.de::pub/opensuse/distribution /srv/www/htdocs [/code]

Note : –delete-after means that we want to remove all of file and folder if it was not found in the source and the process will be executed after finishing copy process. Used the exclude prefix if we want to resticted some folder from being copy. Ex : If i wanto to exclude the debug, src-non-oss and src-oss from being copied, I write a text file with the contens :

debug/
src-non-oss/
src-oss/

and then running the 8th step with this command :

[code language=’cpp’]rsync -av –delete –exclude=exclude.txt ftp5.gwdg.de::pub/opensuse/distribution/ /srv/www/htdocs [/code]

Packman Package

I’m using packman repository on the packman.mirrors.skynet.be. Please feel free to change the server with your nearest mirror.

[code language=’cpp’]rsync -av –delete packman.mirrors.skynet.be::packman/suse/ /srv/www/htdocs/packman/[/code]

Add the command into schedule cron job for regular update.

opensuse rsync server
Share

Linux

Masim "Vavai" Sugianto
Traveller, Open Source Enthusiast & Book Lover. Works as Independent Worker & Self-Employer.

6 Comments


Dean
November 1, 2008 at 13:24
Reply

Shouldn’t your above step with the excludes:

“rsync -av –delete –exclude=exclude.txt ftp5.gwdg.de::pub/opensuse/distribution/ /srv/www/htdocs”

Read:

1.
rsync -av –delete –exclude-from=exclude.txt ftp5.gwdg.de::pub/opensuse/distribution/ /srv/www/htdocs



Kevin
November 1, 2008 at 17:11
Reply

This is a neat idea, but what I’d really like to see is a caching proxy setup where you set a local location as your repository and it proxies data from say the oss repository. When a user asks for a file it checks to see if it exists locally, if it does, it gives the user the file. Otherwise it downloads the file from the mirror and streams it to the user on the fly. After it is done downloading, it keeps it locally, as presumably other users on the network may want the file as well. This sort of proxy would scale much better than mirroring the whole repository, especially for people in lower bandwidth situations (like me). I don’t know if anything like this is available yet.



n-di
November 1, 2008 at 21:26
Reply

use rsync with option “–delay-updates”



sfx
December 21, 2008 at 23:36
Reply

@Kevin

this works like apt-proxy on debian-based system,
I was looking for this kind of feature on suse or rpm-based system.
any hint?



Немного для SUSE 11.1 « jTux - весёлый пингвин
January 29, 2009 at 00:49
Reply

[…] то есть резон создать локальный(зеркало) репозитарий: Making a Local Copy of openSUSE Repository (Mirror Server). Надеюсь выделю местечко на шлюзе и займусь, мне то все […]



Roshan
March 3, 2009 at 19:21
Reply

Thanks man was really helpful
For me this worked out
rsync -av –delete –exclude-from=exclude.txt ftp5.gwdg.de::pub/opensuse/distribution/ /srv/www/htdocs

But it was properly explained in your post.



Harlin
November 30, 2009 at 15:42
Reply

after running this command
rsync -av –delete-after ftp5.gwdg.de::pub/opensuse/distribution /srv/www/htdocs

it automatically downloads repositories for 11.0 but what if i want to download 11.2 repositories?



Немного для SUSE 11.1 « jTux – весёлый пингвин
March 13, 2010 at 01:14
Reply

[…] то есть резон создать локальный(зеркало) репозитарий: Making a Local Copy of openSUSE Repository (Mirror Server). Надеюсь выделю местечко на шлюзе и займусь, мне то все […]



How can i make a local repository
November 10, 2010 at 09:16
Reply

[…] […]



Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Recent Posts

    • Januari 2021 Portfolio Update
    • December 2020 Portfolio Update
    • After a While
    • Life goes On : Farming
    • Pursuing FIRE in Indonesia : Are You Prepared For A Recession?
    • VirtualBox Error Kernel Driver not Installed (rc=-1908) on Zorin OS 15.2
    • ZorinOS on Intel NUC Hades Canyon Series NUC817HVK
    • Banana Farm
    • Zorin OS 15.2 Ultimate
    • Haraka and LDAP Authentication with Zimbra



© Copyright LetsBlog Theme Demo - Theme by ThemeGoods