Mirror is a utility originally intended for making a local copy of an FTP site (or a portion of an FTP site). It is written in Perl by Lee McLoughlin at Imperial College, London.
I like mirror despite there being several other more modern tools available now. I actually use mirror because of its ability to work in reverse - to place a copy of local filesystem on a remote FTP site. I use this to maintain my websites. Once I have them working correctly on my local filesystem I use mirror to FTP the files that need updating onto my ISP's web server.
Mirror doesn't seem to be actively maintained by Lee McLouglin any more. I've fixed a number of issues in mirror myself and the purpose of this web page is to make those fixes available to anyone else who needs them.
Mirror's license prevents me from distributing the fixed package directly: "Permission to modify the software is granted, but not the right to distribute the modified code. Modifications are to be distributed as patches to released version." So here you'll find the last available released package, a series or patches and a script for putting it all together.
- mirror-2.9.tar.gz The latest release of mirror by Lee McLouglin
- ftp.pl_wupatch A patch (not one of mine) associated with making mirror work with the WU-FTPD server.
- patch_20030130 A patch that makes mirror work properly when doing reverse mirroring and directories need to be deleted on the remote web server. Essentially this provides a couple of routines that remained unimplemented in the released version.
- patch_20030814 This fixes an issue that
occurs when newer versions of Perl (e.g. v5.8.0 that ships with Redhat 9)
are used. This is caused by changes in the regular expression
handling of Perl. Typical error messages would be:
unknown input in "./mirror.defaults" line 10 of: package=defaults
unknown keyword in "./mirror.defaults" line 10 of: - patch_20050507 This fixes an issue that caused "chmod=false" to be ignored. This was because the "chmod" was not treated as a boolean option and so not converted to a numeric value.
- mirror_unpack_script.tar.gz This is simple
shell script (it's tar'ed and gzip'ed simply to prevent my web server
trying to run it as a cgi-bin script). If you untar it
(with
tar -xvzf mirror_unpack_script.tar.gz
), put it in the same directory along with all of the above files and run the script it will produce a directory called "mirror-2.9-patched" with the above patches applied. As this depends on tar, gzip, patch, etc. it will only work on Unix type operating systems (Linux, Solaris, etc.) and not Windows.
I hope these patches are useful to you. Let me know if you have problems, or if you've updates of your own for mirror which may be useful to me.