Stephen,<br> Actually I didn't have to do any of that...it was matter of simply changing the rsync root. Here is my script:<br><br><span style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">#!/bin/sh
</span><br style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);"><span style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">EXCLUSION="/etc/rsync-exclude.list"</span><br style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">
<span style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">RSYNC_HOST="<a href="http://rsync.planetmirror.com">rsync.planetmirror.com</a>"</span><br style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">
<span style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">RSYNC_ROOT="<span style="font-weight: bold;">centos/4.2/</span>"</span><br style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">
<span style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">DESTINATION="/home/ftp/pub/Linux/CentOS/4.2/"</span><br style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);"><span style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">
/usr/bin/rsync -aqzH --exclude-from=$EXCLUSION --delete $RSYNC_HOST::$RSYNC_ROOT $DESTINATION</span><br style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);"><span style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 0);">
/bin/chown -R vijay.avarachen:spduslisadmins $DESTINATION<br><span style="color: rgb(0, 0, 0);"></span><br><br>Cheers!<br>Vijay Avarachen<br></span><br><div><span class="gmail_quote">On 1/5/06, <b class="gmail_sendername">
Stephen Weyland</b> <<a href="mailto:stephen.weyland@mercuryblue.com.au">stephen.weyland@mercuryblue.com.au</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span class="q">
Vijay Avarachen wrote:
<blockquote cite="http://mid576c9ac40601052021x59235fefjcfe42009857872ed@mail.gmail.com" type="cite">Stephen,<br>
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 :-(
<br>
<span style="font-weight: bold;">$ du -s -h *</span><br>
0 2<br>
0 3<br>
0 3.1<br>
0 3.3<br>
0 3.4<br>
0 3.5<br>
0 4<br>
439M 4.2<br>
0 RPM-GPG-KEY-CentOS-2<br>
4.0K RPM-GPG-KEY-centos4
<br>
0 RPM-GPG-KEY-CentOS-4<br>
4.0K TIME<br>
4.0K timestamp.txt<br>
<span style="font-weight: bold;"></span><br>
Is there a way to stop it from creating these symlinks that dont' point
to anything. Here is my exclusion list:
<br>
</blockquote></span>
you might consider the following<br>
"For normal users, you should use /4/ and not /4.0/ in your path.
Please see this FAQ concerning the CentOS release scheme:"<br>
<a href="http://www.centos.org/modules/smartfaq/faq.php?faqid=34" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.centos.org/modules/smartfaq/faq.php?faqid=34</a><br>
symlinks need to be included for this reason, i.e /4/ points to /4.2/ .
The other dead symlinks are not hurting anything.<span class="q"><br>
<blockquote cite="http://mid576c9ac40601052021x59235fefjcfe42009857872ed@mail.gmail.com" type="cite">/2.1/<br>
/2/<br>
/3.1/<br>
/3.3/<br>
/3.4/<br>
/3.5/<br>
/3.6/<br>
/3/<br>
/4/<br>
</blockquote></span>
as above on why /4/ should not be excluded.<div><span class="e" id="q_1089e1b1a64126b2_4"><br>
<blockquote cite="http://mid576c9ac40601052021x59235fefjcfe42009857872ed@mail.gmail.com" type="cite">/4.0/<br>
/4.1/<br>
/4.3beta/<br>
/HEADER.images/<br>
/RPM-GPG-KEY-CentOS-2/<br>
/RPM-GPG-KEY-CentOS-4/<br>
/build/<br>
/graphics/<br>
/HEADER.html/<br>
/RPM-GPG-KEY-CentOS-3/<br>
/RPM-GPG-KEY-CentOS-4/<br>
<br>
#4.2 excludes<br>
/4.2/Readme.txt<br>
/4.2/addons/<br>
/4.2/apt/<br>
/4.2/centosplus/<br>
/4.2/contrib/<br>
/4.2/csgfs/<br>
/4.2/docs/<br>
/4.2/extras/<br>
/4.2/isos/<br>
/4.2/os/
<br>
/4.2/testing/<br>
#Only get i386, ia64, x86_64<br>
/4.2/updates/SRPMS/<br>
/4.2/updates/alpha/<br>
/4.2/updates/ppc/<br>
/4.2/updates/s390/<br>
/4.2/updates/s390x/<br>
<br>
</blockquote></span></div>
i.e. /4/ is a symlink to the latest release, in this case 4.2/ which is
why mine was configured as it was<br>
<br>
also if you use the following method in your exclusion list<br>
addons/<br>
apt/ <br>
etc, you will exclude that dir from all locations in the tree<div><span class="e" id="q_1089e1b1a64126b2_6"><br>
<br>
<br>
<blockquote cite="http://mid576c9ac40601052021x59235fefjcfe42009857872ed@mail.gmail.com" type="cite">Thanks,<br>
Vijay Avarachen<br>
<br>
<div><span class="gmail_quote">On 1/5/06, <b class="gmail_sendername">Stephen
Weyland</b> <<a href="mailto:stephen.weyland@mercuryblue.com.au" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">stephen.weyland@mercuryblue.com.au</a>>
wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span> Vijay Avarachen wrote:
<blockquote cite="http://mid576c9ac40601050808j499900f0j7d1b8b7de6ddac17@mail.gmail.com" type="cite">Hello,<br>
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. <br>
<br>
</blockquote>
</span>I just finished figuring this out and documenting, so here
you go. You
can probably fine tune it as this is my first attempt.<br>
<br>
### 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.<br>
### We are going to create 2 files and edit a 3rd<br>
### 1- Create a directory to store some files in.<br>
### 2- A script to run rsync --- "update.sh"<br>
### 3- An exclusion list so we don't download a bunch of stuff we don't
want --- "rsync-exclude.list"<br>
### 4- We need to schedule the update to run by modifying ---
/etc/crontab, (crontab -e would be better)<br>
<br>
1- Create a directory to store the files "update.sh" and
"rsync-exclude.list"<br>
mkdir /opt/mirror<br>
<br>
2- Create "update.sh" script to run rsync<br>
# See a list of mirrors at
<a href="http://www.centos.org/modules/tinycontent/index.php?id=13" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.centos.org/modules/tinycontent/index.php?id=13</a><br>
# --delete means delete files locally that no longer exist on the mirror<br>
vi /opt/mirror/update.sh<br>
rsync -aqzH --exclude-from=/opt/mirror/rsync-exclude.list --delete
rsync.planetmirror.com::centos /var/ftp/pub/centos/<br>
# make it executable<br>
chmod 700 /opt/mirror/update.sh<br>
<br>
3- Create an exclude list<br>
vi /opt/mirror/rsync-exclude.list<br>
# add a list of the files you want to be excluded in the rsync process<br>
# files with a slash at the beginning are referenced to the root of the
rsync directory you connected to.<br>
# in this case <a href="http://rsync.planetmirror.com/centos" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rsync.planetmirror.com/centos</a>
(the ::centos above is the
/centos here)<br>
# 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<br>
<br>
/2.1/<br>
/2/<br>
/3.1/<br>
/3.3/<br>
/3.4/<br>
/3.5/<br>
/3.6/<br>
/3/<br>
# The following need to be excluded from /4/<br>
apt/<br>
docs/<br>
isos/<br>
# 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.<br>
SRPMS/<br>
alpha/<br>
ia64/<br>
ppc/<br>
s390/<br>
s390x/<br>
x86_64/<br>
<br>
<br>
<br>
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<br>
<br>
1 1 * * sun root /opt/mirror/update.sh<br>
<br>
<blockquote cite="http://mid576c9ac40601050808j499900f0j7d1b8b7de6ddac17@mail.gmail.com" type="cite"><span>Thank you,<br>
Vijay Avarachen<br clear="all">
<br>
-- <br>
"Knowledge is the only wealth that grows as you spend it, and
diminishes as you save it."<br>
-- ancient Sanskrit saying </span>
<pre><hr size="4" width="90%">
_______________________________________________<br>CentOS-mirror mailing list<br><a href="mailto:CentOS-mirror@centos.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">CentOS-mirror@centos.org</a>
<a href="http://lists.centos.org/mailman/listinfo/centos-mirror" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.centos.org/mailman/listinfo/centos-mirror</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">-- <br>Stephen Weyland</pre>
<span></span><br>
_______________________________________________<br>
CentOS-mirror mailing list<br>
<a href="mailto:CentOS-mirror@centos.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">CentOS-mirror@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-mirror" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.centos.org/mailman/listinfo/centos-mirror</a><br>
<br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
"Knowledge is the only wealth that grows as you spend it, and
diminishes as you save it."<br>
-- ancient Sanskrit saying
<pre><hr size="4" width="90%">
_______________________________________________<br>CentOS-mirror mailing list<br><a href="mailto:CentOS-mirror@centos.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">CentOS-mirror@centos.org</a>
<a href="http://lists.centos.org/mailman/listinfo/centos-mirror" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.centos.org/mailman/listinfo/centos-mirror</a>
</pre>
</blockquote>
<br>
<br>
</span></div><span class="sg"><pre cols="72">-- <br>Thanks<br><br>Stephen Weyland<br>Mercury Blue<br>8398-1210</pre>
</span><br>_______________________________________________<br>CentOS-mirror mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:CentOS-mirror@centos.org">CentOS-mirror@centos.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.centos.org/mailman/listinfo/centos-mirror" target="_blank">http://lists.centos.org/mailman/listinfo/centos-mirror</a><br><br><br></blockquote></div>
<br><br clear="all"><br>-- <br>"Knowledge is the only wealth that grows as you spend it, and diminishes as you save it."<br>-- ancient Sanskrit saying