Sparemint logo

Home Information News Development Download Mirrors

How To Mirror Sparemint


Note: This page is mainly intended for ftp site maintainers that want to mirror the Sparemint site. Of course, as an "ordinary" user you may also use the information found here to keep an always up-to-date copy of the Sparemint site at home, on your private machine or as a distributor you may auto-update your CD-ROM source directory.

However, please be gentle, and unless you really offer a public mirror site for Sparemint, rather use these mirror sites for updating your private Sparemint copy. If the load on the Sparemint home server is getting too high it is very likely that public access to the server either gets completely forbidden or restricted to certain hours!

General

If you are an experienced ftp maintainer you will probably find better ways to mirror Sparemint than the ones outlined here. However, the first step before you start to mirror Sparemint should always be to contact the Sparemint team so that mirror frequencies and schedules can be harmonized.

In the following examples, please always replace

Please specify a valid e-mail address as your remote password even if you "privately" mirror Sparemint so that we have a chance to contact you in case you unintentionally disturb the maintainance of this site with your mirroring activities.

Frequencies and Schedules

It is up to you how often you mirror Sparemint but you should tell us so that we can give information about the mirroring frequency on our mirrors page. In case you mirror Sparemint on a regular basis with a cron job you should also negotiate the best time of the day for the mirror job to avoid load peaks.

Please avoid office hours in Europe for private mirroring.

Available Mirroring Software

This page outlines the usage of the popular mirroring software mirror. The package is available on the Sparemint site as either a precompiled packages for MiNT as well as a source RPM (simply follow the link in the last senctence). The mirror package is a set of Perl scripts. It should run on every system that is supported by Perl, including Microsoft Windows Systems.

Package File

First create a package file /etc/mirror.sparemint:
package=sparemint
remote_password=your_email_address
remote_dir=/pub/sparemint
site=wh58-508.st.uni-magdeburg.de
local_dir=YOUR_DIR
update_log=YOUR_LOGFILE
exclude_patt=.*~|^expired|.*core$|#.*#$|.*\.tmp$|^LOP$
make_bad_symlinks=false
save_deletes=false
do_deletes=true
recursive=true

Test

You should first try a dry run with the command:
 mirror -n -d /etc/mirror.sparemint | less
You may repeat the option -d up to four times thus increasing the amount of debugging information. The option -n inhibits actual retrieval of the files. The mirror program only displays what it would do. As soon as the program works as supposed to you should add a cron job for it (of course you should remove the options -d -n then).

Caveats

The script that generates most of the files of the Sparemint site tries its best not to overwrite files that haven't changed so that you can mirror Sparemint based on the timestamps. Some files that do not change (or don't change significantly) however get overwritten on every script run. As a private mirror you should consider to exclude the files html/*.html from the main package file and create a second package file which retrieves them based on the file size.

Another caveat of the mirror program in general is that you cannot easily see which site you actually mirror. RedHat Software suggests the following patch to mirror:


--- mirror.old Fri Feb 27 09:22:20 1998
+++ mirror Fri Feb 27 09:47:59 1998
@@ -866,7 +866,10 @@
local( $key, $val, $str );
&msg( $msg );
- &msg( "package=$package $site:$remote_dir -> $local_dir\n\t" );
+ $HOSTNUM = gethostbyname($site);
+ @HOSTNAME = unpack('C4',$HOSTNUM);
+ $HOSTNAME = join('.',@HOSTNAME);
+ &msg( "package=$package $site($HOSTNAME):$remote_dir -> $local_dir\n\t);
for $key (sort keys( %value ) ){
next if $key eq 'package' ||
@@ -941,7 +944,10 @@
&pr_variables( "\n" );
}
elsif( $package %% ! $pretty_print ){
- &msg( "package=$package $site:$remote_dir -> $local_dir\n");
+ $HOSTNUM = gethostbyname($site);
+ @HOSTNAME = unpack('C4',$HOSTNUM);
+ $HOSTNAME = join('.',@HOSTNAME);
+ &msg( "package=$package $site($HOSTNAME):$remote_dir -> $local_dir\n\t);
}
# Don't bother if trying to mirror here!
It is currently not possible to use rsync to mirror Sparemint. If this is an issue for you please contact the Sparemint team.

Please contact Guido Flohr <guido(at)freemint.de> for corrections or suggestions.