1 <!--#include virtual="/samba/header.html" -->
2 <title>Mirroring Samba</title>
3 <!--#include virtual="/samba/header2.html" -->
5 <h2>Mirroring Samba</h2>
7 <p>Quite a few sites like to mirror the Samba ftp site, and sometimes the
8 web site. The problem with these mirrors is that they can cost us an
9 enormous amount in network charges. To try to minimise the costs
10 please consider the following.</p>
12 <h3>Is it needed?</h3>
14 <p>If this mirror is for your personal use then please
15 reconsider. Otherwise check to see if there is
16 another mirror site within reasonable proximity to you already. If there is then think
17 about whether your mirror is really needed.</p>
21 <p>If you decide to go ahead and setup a mirror then please contact
22 us so we can then add you to the list of available mirrors. Write to the
23 <a href="mailto:mirrors-owner@samba.org">mirror owner</a>.</p>
25 <h3>Not too often</h3>
27 <p>Please don't be tempted to run your mirror script on an hourly
28 basis. Once a day really is good enough for Samba stuff. </p>
30 <h3>Join the mirrors@samba.org list</h3>
32 <p>If you want to mirror this site then please join the
33 mirrors@samba.org mailing list so you can be notified of
34 changes in the site that require your attention. The list has very low
35 traffic so it should not be a burden. See
36 <a href="http://lists.samba.org/pipermail/mirrors/">
37 http://lists.samba.org/pipermail/mirrors/</a> for information on how to join the list.</p>
39 <p> may also use this list to ask questions about mirroring problems
42 <h3>Use anonymous rsync</h3>
44 <p>Please do NOT use ftp mirror scripts or web robots to mirror our
45 site. Some of these mirroring systems are very inefficient. Not
46 only do they take a long time to run but they also use a lot more
47 bandwidth than is necessary. Web mirror scripts are particularly bad.</p>
49 <p>If you do attempt to use a web robot then our automatic web robot
50 detector will probably catch you and ban your entire site.</p>
52 <p>Instead, please use anonymous rsync. You can read more about rsync at
54 href="http://samba.org/rsync/">http://samba.org/rsync/</a>,
55 but basically what you want to do is <a
56 href="ftp://samba.org/pub/rsync/">download rsync</a>, compile
57 it for your system then run something like this to do a mirror run:</p>
60 rsync -az --delete --force mirror.samba.org::sambaftp/ ~ftp/pub/samba
63 <p>This will also give you a much better quality mirror than other
64 mirroring systems. The timestamps will be right to the second,
65 symbolic links will be preserved and all the permissions will be
68 <h3>Mirroring the web pages</h3>
70 <p>If you want to mirror the Samba web pages then it is especially
71 important that you do not use a web robot. We have had endless
72 problems with robots using enormous amounts of bandwidth by following
73 infinite loops in the web pages or downloading stuff that it just isn't
74 useful to have on a mirror site.</p>
76 <p>Instead, please join the mirrors mailing list mentioned above and ask
77 on that list. Then if you go ahead please use rsync like this:</p>
80 rsync -az --delete --exclude=ftp mirror.samba.org::sambawww/ /wwwmirrors/samba/
83 <p>To complete the web mirror you will also need to mirror the ftp site
84 as above then create a symbolic link from
85 http://your.host.name/samba/ftp to the samba ftp area. Consult your
86 web server and OS documentation about how to use symbolic
87 links. Typicaly it involves something like this:</p>
90 ln -s ~ftp/pub/samba /var/www/htdocs/samba/ftp
93 </p>then you add the option "SymLinksIfOwnerMatch" to your apache
94 configuration. Note that this means that the symbolic link
95 <em>must</em> be owned by the same user that owns the ftp directory.</p>
97 <p>The hostname of your web site mirror doesn't matter (you don't need to
98 use virtual hosting) but please make the site available as
99 http://your.host.name/samba/ so that internal references to /samba/
102 <h3>Server side includes</h3>
104 <p>You must also ensure that your web server supports server side
105 includes. To enable these under apache you would use the option
106 IncludesNOEXEC in an Options directive in a directory section.</p>
108 <h3>Example config</h3>
110 <p>A typical config for apache serving the Samba web pages would be</p>
113 <Directory /var/www/htdocs/samba>
115 AddHandler server-parsed .html
116 Options IncludesNOEXEC Indexes SymLinksIfOwnerMatch
124 <h3>Country Alias</h3>
126 <p>If you run a Samba web mirror site then you can ask for a country
127 alias in the samba.org domain for your site. Send mail to <a
128 href="mailto:mirrors-owner@samba.org">mirrors owner</a>.</p>
130 <h3>Local Customisation</h3>
132 <p>You can customise your mirror of Samba by editing the files
133 local_header.html and local_footer.html. If you do that then remember
134 to exclude those files from your rsync script or they will be
137 <p>Please keep customisations small and in keeping with the rest of the
140 <h3>List archives</h3>
142 <p>If you have problems setting up your web mirror then please ask on the
143 mirrors@samba.org mailing list or look in the <a
144 href="http://lists.samba.org/pipermail/mirrors/">list archives</a>.</p>
146 <!--#include virtual="/samba/footer.html" -->