[CentOS-mirror] Local mirror question
vavarachen at gmail.com
Fri Jan 6 04:21:05 UTC 2006
Thank you very much for your help. It works pretty good :-) but has a
few glitches. I read the rsync man pages and according to it the exclusion
list contains files and folder name patterns to be excluded. The exclusion
works but it still creates symlinks :-(
$ du -s -h *
Is there a way to stop it from creating these symlinks that dont' point to
anything. Here is my exclusion list:
#Only get i386, ia64, x86_64
On 1/5/06, Stephen Weyland <stephen.weyland at mercuryblue.com.au> wrote:
> Vijay Avarachen wrote:
> My environment is using CentOS 4.2 on all workstations and I would
> like to setup a local mirror just for the updates. I only x86, x86_64 and
> ia64 architectures. How can I setup a rsync mirror of the updates folder
> for only these architectures? I am very new to rsync, so please apologize
> if this is a very ignorant question.
> I just finished figuring this out and documenting, so here you go. You
> can probably fine tune it as this is my first attempt.
> ### How to use rsync to create a local mirror of the insallation files for
> CentOS, of course this could be used for anything else with modifications.
> ### We are going to create 2 files and edit a 3rd
> ### 1- Create a directory to store some files in.
> ### 2- A script to run rsync --- "update.sh"
> ### 3- An exclusion list so we don't download a bunch of stuff we don't
> want --- "rsync-exclude.list"
> ### 4- We need to schedule the update to run by modifying ---
> /etc/crontab, (crontab -e would be better)
> 1- Create a directory to store the files "update.sh" and "
> mkdir /opt/mirror
> 2- Create "update.sh" script to run rsync
> # See a list of mirrors at
> # --delete means delete files locally that no longer exist on the mirror
> vi /opt/mirror/update.sh
> rsync -aqzH --exclude-from=/opt/mirror/rsync-exclude.list --delete
> rsync.planetmirror.com::centos /var/ftp/pub/centos/
> # make it executable
> chmod 700 /opt/mirror/update.sh
> 3- Create an exclude list
> vi /opt/mirror/rsync-exclude.list
> # add a list of the files you want to be excluded in the rsync process
> # files with a slash at the beginning are referenced to the root of the
> rsync directory you connected to.
> # in this case rsync.planetmirror.com/centos (the ::centos above is the
> /centos here)
> # files with a trailing slash indicate any directory with that name
> anywhere. e.g "apt/" will skip any directory in any sub-tree named apt
> # The following need to be excluded from /4/
> # The following need to be excluded from all directories they are present
> in, like /4/os/ and /4/updates/ ... We only want the i386 directory.
> 4- Add a line to /etc/crontab to run the job once a day or once a week or
> whenever, the following shows run on the 1st minute, 1st hour, Sunday
> 1 1 * * sun root /opt/mirror/update.sh
> Thank you,
> Vijay Avarachen
> "Knowledge is the only wealth that grows as you spend it, and diminishes
> as you save it."
> -- ancient Sanskrit saying
> CentOS-mirror mailing list
> CentOS-mirror at centos.orghttp://lists.centos.org/mailman/listinfo/centos-mirror
> Stephen Weyland
> CentOS-mirror mailing list
> CentOS-mirror at centos.org
"Knowledge is the only wealth that grows as you spend it, and diminishes as
you save it."
-- ancient Sanskrit saying
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentOS-mirror