March 2024 | ||||||
Mo | Tu | We | Th | Fr | Sa | Su |
26 | 27 | 28 | 29 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
$ lynx /usr/share/doc/mirror/html/mirror.shtml
The HTML documentation is the authoritive source.
/etc/mirror/ /usr/share/doc/mirror/ /usr/share/mirror/
The -g option can keep a single file or directory up to date and requires no configuration files.
Use -r to avoid downloading a whole directory listing if you just want a few files in the same directory.
Example configuration and package files are in subdirectories of /etc/mirror and /usr/share/doc/mirror/examples.
If mirror behaves strangely use -d to see what is happening. The more you use the more detail so redirect the output to a file.
When mirror fails to work for you, the default value of a
parameter described in mirror.shtml may need
setting or resetting e.g. if your machine connects through a
strict firewall, you may need passive FTP. Set the variable,
passive_ftp=true
on a line in your package file for passive FTP.
For postprocessing of a mirror run you can set
mail_prog=pathname
where pathname is a script mirror will execute after
completing a package. Mirror sends the logfile to
pathname's
stdin which pathname may read and process. You can set
mail_subject=$keyword ...
where $keyword will be replaced by its value for the package and
pathname can read this as an argument. mail_to can be set
to ordinary arguments. If you still want email from this mirror
package pathname must send it. Try all this only when no simpler
way of using mirror works.
Use cron to deal with network errors by daily or weekly repetition at a time when the network near both server and client is idle.
A bash script can run mirror commands sequentially but mirror-master can start them simultaneously and/or sequentially for best use of core and network idle time.
You should not mirror the same site more than once in 24 hours unless you use ls-lR files to improve tracking and minimize server load. Some FTP servers encourage the use of ls-lR files by disabling recursive directory listings. See mirror-lslR.shtml for instructions.
mirror downloads each file into a temporary file prefixed .in. and renames on completion. If you or anything interrupt and then restore the net link, wait for mirror to either restart downloading or time itself out in about ten minutes. When relinked and after a time out reissue the command and mirror restarts from the end of the .in. file.
To stop mirror press Control-Z. After a restart with fg wait for mirror to resume downloading or time out. A restart after such time out, begins with the end of the .in. file. If you reboot, log off, interrupt with ^C or kill with ^U mirror downloads the .in. file again on restart.
For safe system use create a normal user say ftpadm. Use chown -R ftpadm. on the directories /var/log/mirror/, /var/lib/mirror/, /etc/mirror/ and /home/ftp/pub/ to allow ftpadm to operate mirror and mirror-master. Add ftpadm to ftpd's etc/group and etc/passwd using ftpd documentation. Servers with more than one archivist may have an ftpadm group.
http://sunsite.org.uk/packages/mirror/
/usr/share/doc/mirror/copyright.