.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH WP-MIRROR "1" "November 2014" "wp-mirror 0.7.4" "User Commands"
.SH NAME
wp-mirror \- utility for building a mirror of a set of wikipedias
.SH SYNOPSIS
.B wp-mirror
[\fIOPTIONS\fR] [\fICONFIGFILE\fR]
.SH DESCRIPTION
The Wikimedia Foundation offers Wikipedias in nearly 300 languages.
In addition, the WMF has several other projects (e.g. wikibooks,
wiktionary, etc.) for a total of around 1000 wikis.
.PP
Wp\-mirror is a free utility for mirroring any desired set of these
wikis. That is, it builds a wiki farm that the user can browse
locally. Many users need such off\-line access, often for reasons of
availability, mobility, and privacy. Wp\-mirror builds a complete
mirror with original size media files. Wp\-mirror is robust and uses
check\-pointing to resume after interruption.
.PP
Wp\-mirror by default mirrors the `simple wikipedia' and `simple
wiktionary' (Simple English means shorter sentences). The default
should work `out\-of\-the\-box' with no user configuration. It should
build in 200ks (two days), occupy 150G of disk space, be served
locally by virtual hosts and
, and update automatically every week.
The default should be suitable for anyone who learned English as a
second language (ESL).
.PP
The top ten wikipedias are: en, de, fr, nl, it, es, pl, ru, ja, and
pt. Because wp\-mirror uses original size media files, the top ten are
too large to fit on a laptop with a single 500G disk, unless the user
does not need the media files (and this is configurable). The `en
wikipedia' is the most demanding case. It should build in 1Ms (twelve
days), occupy 3T of disk space, be served locally by a virtual host
, and update automatically every month.
.PP
Homepage:
.SH OPTIONS
.TP
\fB\-\-add\fR {|||all}
add given wiki(s) to mirror; and exit.
.TP
\fB\-\-drop\fR {|||all|template}
drop given wiki(s) from mirror; and exit.
.TP
\fB\-\-help\fR
display this help, and exit.
.TP
\fB\-\-mirror\fR [import|media|thumb|xml2sql]
build mirror, and exit. If `import', then process dumps
with `importDump.php'; if `media', then download media
files only; if `thumb', then generate thumbs only; if
`xml2sql' (default), then process XML dump files with
`mwxml2sql'.
.TP
\fB\-\-version\fR
display version and copyright, and exit.
.PP
Options for monitor mode:
.TP
\fB\-\-gui\fR
operate monitor in gui mode (default).
.TP
\fB\-\-monitor\fR
operate in monitor mode (gui default).
.TP
\fB\-\-screen\fR
operate monitor in screen mode.
.TP
\fB\-\-text\fR
operate monitor in text mode.
.PP
Options used during build and install:
.TP
\fB\-\-copyright\fR
display copyright file, and exit.
.PP
Options for developers:
.TP
\fB\-\-debug\fR
run in debug mode (more verbose).
.TP
\fB\-\-delete\fR {|||all|template}
delete files and state info for given wiki(s); and exit.
.TP
\fB\-\-dump\fR {|||all|template}
dump wiki database(s) to file `wiki\-name.sql' in working
directory; and exit. If the wiki is `template', then the
empty database `wikidb' will be dumped to
`database_farm.sql'.
.TP
\fB\-\-info\fR
display parameters, and exit.
.TP
\fB\-\-profile\fR [0|run\-number]
for run\-number a positive integer, display real\-time
profile and disk usage stats for that mirror\-building run;
for zero, delete all stored profile data; for no
run\-number, display table with five most recent runs
compared side\-by\-side; and exit.
.TP
\fB\-\-restore\-default\fR
drop all databases and files (except media files), and
start over (dangerous).
.TP
\fB\-\-update\fR {|||all|template}
update wiki database(s) to latest mediawiki schema; and
exit.
.SH FILES
.TP
/etc/apache2/sites\-available/wp\-mirror.site.conf
virtual host for web server
.TP
/etc/cron.d/wp\-mirror
weekly cron job
.TP
/etc/logrotate.d/wp\-mirror
logrotate configuration
.TP
/etc/wp\-mirror\-mediawiki/LocalSettings_account.php
database credentials for building and using a wikipedia farm
.TP
/etc/wp\-mirror\-mediawiki/LocalSettings_wpmirror.php
configuration file for building and using a wikipedia farm
.TP
/etc/wp\-mirror/default.conf
default configuration file which lists all configurable parameters (do not edit this file)
.TP
/etc/wp\-mirror/local.conf
local configuration file (edit this file instead)
.TP
/usr/share/doc/wp\-mirror/doc/wp\-mirror\-x.y.pdf.gz
WP\-MIRROR Reference Manual
.TP
/usr/share/wp\-mirror\-mediawiki/maintenance/database_farm.sql
template for wikimedia databases
.TP
/usr/share/wp\-mirror\-mediawiki/maintenance/importDump_farm.php
wikipedia farm wrapper for importDump.php
.TP
/usr/share/wp\-mirror\-mediawiki/maintenance/runJobs_farm.php
wikipedia farm wrapper for runJobs.php
.TP
/usr/share/wp\-mirror\-mediawiki/maintenance/update_farm.php
wikipedia farm wrapper for update.php
.TP
/usr/share/pixmaps/wp\-mirror.xpm
icon for menu system
.TP
/var/lib/wp\-mirror\-mediawiki/favicon.ico
favicon.ico file for browser
.TP
/var/lib/wp\-mirror\-mediawiki/wp\-mirror.png
WP\-MIRROR logotype for browser
.TP
/var/lib/wp\-mirror\-mediawiki/images/
media files are stored here
.TP
/var/lib/wp\-mirror\-mediawiki/images/wp\-mirror/
working files are placed here
.TP
/var/lib/mysql/wikidb
empty wikimedia database (loaded from database_farm.sql)
.TP
/var/lib/mysql/wpmirror
database for wp\-mirror state information
.TP
/var/lib/mysql/wiki\-database
one database for each mirror in the wikipedia farm (where wiki\-database stands for the name of a wiki database, such as `enwiki' or `simplewiktionary')
.TP
/var/log/wp\-mirror.log
log file
.TP
/var/run/wp\-mirror.pid
pid file
.SH EXAMPLES
Installation is described in the WP\-MIRROR Reference Manual, usually
to be found under `/usr/share/doc/wp\-mirror/doc/'. It should be
considered essential reading.
.PP
Wp\-mirror uses two configuration files: `/etc/wp\-mirror/default.conf'
and `/etc/wp\-mirror/local.conf'. The first shows all the configurable
parameters. The second is where you should make your edits (if any).
By default, `wp\-mirror' builds a mirror of the `simple' wikipedia. The
`simple' wikipedia is the collection of articles written using Simple
English. That is, the articles are written using shorter sentences, as
would be appropriate for those for whom English is a Second Language
(ESL). The `simple' wikipedia is also suitable for children. If you
wish for a different wikipedia, or a set of wikipedias's, then edit
`/etc/wp\-mirror/local.conf'.
.PP
After you edit `/etc/wp\-mirror/local.conf' you should run as root:
.IP
# wp\-mirror
.PP
You may run multiple instances of `wp\-mirror' concurrently. The first
instance runs in mirror mode, downloading and installing the articles
and media files. Each additional instance of `wp\-mirror' runs in
monitor mode. Instances running in monitor mode display the state of
each mirror. If a suitable windowing system is present, progress bars
are rendered using graphics in a separate window, and otherwise using
ASCII characters in a console. If X complains that you lack
permission, first try:
.IP
\f(CW$ xhost local:\fR
.PP
You may control the mode of each instance of `wp\-mirror' by providing
either the `\-\-mirror' or the `\-\-monitor' option at the command line.
For a desktop PC, it is reasonable to run two or three instances in
mirror mode together with an instance in monitor mode. However, for a
laptop PC, it is best to run just one instance in mirror mode together
with one instance in monitor mode.
.PP
Wp\-mirror normally runs in background as a weekly cron job, updating
the mirrors whenever the Wikimedia Foundation posts new dump files.
.PP
Wp\-mirror configures a virtual\-host for your web\-server in
`/etc/apache2/enabled/wp\-mirror.site.conf'. Wp\-mirror adds the
following lines to `/etc/hosts':
.IP
::1 simple.wikipedia.site
.IP
::1 simple.wiktionary.site
.PP
Then just open a web browser to and
enjoy.
.SH AUTHOR
Written by Dr. Kent L. Miller.
.SH "REPORTING BUGS"
Report bugs in `wp\-mirror' to .
.SH COPYRIGHT
Copyright \(co 2011\-2014 Dr. Kent L. Miller. All rights reserved.
.PP
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
.PP
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
.PP
You should have received a copy of the GNU General Public License
along with this program. If not, see