[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Re: up2date problem SOLVED



Ben Nickell wrote:
I'd love to see your script. I'm pretty sure I could create one like it, even with my meager scripting skills, but don't have the time right now since the semester is just starting here at my real job.
This could be a real time saver for me...

Ben,
The script I use is below. As you can see, the script is in cron.daily so it is executed once a day. The script runs rsync twice to sync base and updates. I exclude some things with the --exclude option.
I created /home/mirror/yum-repository/fedora/base and /home/mirror/yum-repository/fedora/updates to store the files and then made a symbolic link called mirror in /var/www/html/ so apache would see it. Then I added http://myserver/mirror/yum-repository/base and http://myserver/mirror/yum-repository/updates to yum.conf on the clients and commented out the old entries.
You can adjust the mirror name/path and local path as needed. Hope this is useful.


Thanks,

Dale

[root viewlib root]# cat /etc/cron.daily/rsync-yum-repository
#!/bin/sh
/usr/bin/rsync --verbose --progress --stats --archive --partial --exclude SRPMS/ --exclude dosutils/ --exclude images/ --exclude isolinux/ mirrors.kernel.org::fedora/core/1/i386/os/ /home/mirror/yum-repository/fedora/base/


/usr/bin/rsync --verbose --progress --stats --archive --delete --exclude debug/ --exclude SRPMS/ --partial mirrors.kernel.org::fedora/core/updates/1/i386/ /home/mirror/yum-repository/fedora/updates/
[root viewlib root]#


note that the script has two long lines where everything is space separated (mozilla mail wraps the 2 lines into 4 lines).







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]