Localisation updates from http://translatewiki.net.
[mediawiki.git] / maintenance / dumpTextPass.php
blob2e0d03b1f024afe1a3739ab163a495c87868aff6
1 <?php
2 /**
3 * Script that postprocesses XML dumps from dumpBackup.php to add page text
5 * Copyright (C) 2005 Brion Vibber <brion@pobox.com>
6 * http://www.mediawiki.org/
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * http://www.gnu.org/copyleft/gpl.html
23 * @file
24 * @ingroup Maintenance
27 $originalDir = getcwd();
29 require_once( __DIR__ . '/commandLine.inc' );
30 require_once( __DIR__ . '/backupTextPass.inc' );
33 $dumper = new TextPassDumper( $argv );
35 if ( !isset( $options['help'] ) ) {
36 $dumper->dump( true );
37 } else {
38 $dumper->progress( <<<ENDS
39 This script postprocesses XML dumps from dumpBackup.php to add
40 page text which was stubbed out (using --stub).
42 XML input is accepted on stdin.
43 XML output is sent to stdout; progress reports are sent to stderr.
45 Usage: php dumpTextPass.php [<options>]
46 Options:
47 --stub=<type>:<file> To load a compressed stub dump instead of stdin
48 --prefetch=<type>:<file> Use a prior dump file as a text source, to save
49 pressure on the database.
50 (Requires the XMLReader extension)
51 --maxtime=<minutes> Write out checkpoint file after this many minutes (writing
52 out complete page, closing xml file properly, and opening new one
53 with header). This option requires the checkpointfile option.
54 --checkpointfile=<filenamepattern> Use this string for checkpoint filenames,
55 substituting first pageid written for the first %s (required) and the
56 last pageid written for the second %s if it exists.
57 --quiet Don't dump status reports to stderr.
58 --report=n Report position and speed after every n pages processed.
59 (Default: 100)
60 --server=h Force reading from MySQL server h
61 --current Base ETA on number of pages in database instead of all revisions
62 --spawn Spawn a subprocess for loading text records
63 --help Display this help message
64 ENDS