1 cat <<HEAD > mirror.html
2 <html>
3 <head>
4 <title>website mirror instructions</title>
5 </head>
6 <h1>RRDtool Mirror Source</h1>
7 <p>Run the following commands once a day.</p>
8 <pre>
9 #!/bin/sh
10 cd /YOUR/MIRROR/TREE
11 wget --no-host-directories --timestamping --recursive --level=1 http://oss.oetiker.ch/rrdtool/mirror.html
12 </pre>
14 <p>Create a file called <b>hoster.html</b> like that:</p>
15 <pre>
16 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
17 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
18 <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
19 <head>
20 <style type="text/css">
21 body {
22 margin: 0px;
23 padding: 0px;
24 background-color: #f0f0f0;
25 font-family: sans-serif;
26 }
28 #hoster a {
29 color: black;
30 text-decoration: none;
31 </style>
32 </head>
33 <body>
34 <div id="hoster">
35 mirror by <a target="_top" href="http://YOUR.SITE">Company</a>
36 </div>
37 </body>
38 </html>
39 </pre>
41 HEAD
43 for xt in html png gif ico css htaccess js; do
44 gfind . -name "*.$xt" -not -name stat"*" -not -name "hoster*" -exec printf '<a href="{}">.</a>' \; >> mirror.html
45 done
46 echo "</body></html>" >> mirror.html
48 rsync --copy-unsafe-links --verbose --times --delete --exclude pub --exclude='*~' --exclude=".svn" --exclude=".condor" -r . oposs@oss.oetiker.ch:public_html/rrdtool/
49 #rsync --copy-unsafe-links --verbose --times --delete --exclude pub --exclude='*~' --exclude=".svn" --exclude=".condor" -r . /home/oetiker/public_html/webtools/rrdtool
50 #rsync --links --verbose --times --delete --exclude pub --exclude='*~' --rsh=ssh -r . tobi@ipn.caida.org:/ipn/web/Tools/RRDtool