Here is how to create a local copy of OpenSUSE repository
OSS & Non-OSS Package
Install Rsync package, by using YAST | Software | Software Management or from konsole with this command:
zypper in rsync
Check the mirror content with anonymous Rsync
rsync ftp5.gwdg.de::
Check the content of openSUSE folder
rsync ftp5.gwdg.de::pub/opensuse/
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)
rsync -av --delete-after ftp5.gwdg.de::pub/opensuse/distribution /srv/www/htdocs
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 contents :
debug/
src-non-oss/
src-oss/
and then running the 8th step with this command :
rsync -av --delete --exclude=exclude.txt ftp5.gwdg.de::pub/opensuse/distribution/ /srv/www/htdocs
Packman Package
I’m using packman repository on the packman.mirrors.skynet.be. Please feel free to change the server with your nearest mirror.
rsync -av --delete packman.mirrors.skynet.be::packman/suse/ /srv/www/htdocs/packman/
Add the command into schedule cron job for regular update.