2005-10-16 17:33:41 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
2010-10-03 09:25:28 +00:00
|
|
|
* Script that postprocesses XML dumps from dumpBackup.php to add page text
|
|
|
|
|
*
|
2011-07-20 23:06:24 +00:00
|
|
|
* Copyright (C) 2005 Brion Vibber <brion@pobox.com>
|
2014-03-20 15:45:01 +00:00
|
|
|
* https://www.mediawiki.org/
|
2006-01-07 13:09:30 +00:00
|
|
|
*
|
2005-10-16 17:33:41 +00:00
|
|
|
* 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
|
2006-01-07 13:09:30 +00:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
2005-10-16 17:33:41 +00:00
|
|
|
* (at your option) any later version.
|
2006-01-07 13:09:30 +00:00
|
|
|
*
|
2005-10-16 17:33:41 +00:00
|
|
|
* 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.
|
2006-01-07 13:09:30 +00:00
|
|
|
*
|
2005-10-16 17:33:41 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
2006-04-05 07:43:17 +00:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-10-16 17:33:41 +00:00
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @file
|
|
|
|
|
* @ingroup Maintenance
|
2005-10-16 17:33:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
$originalDir = getcwd();
|
|
|
|
|
|
2013-05-17 00:16:59 +00:00
|
|
|
require_once __DIR__ . '/commandLine.inc';
|
|
|
|
|
require_once __DIR__ . '/backupTextPass.inc';
|
2005-10-16 17:33:41 +00:00
|
|
|
|
|
|
|
|
$dumper = new TextPassDumper( $argv );
|
|
|
|
|
|
2010-10-02 21:58:04 +00:00
|
|
|
if ( !isset( $options['help'] ) ) {
|
2011-07-20 23:06:24 +00:00
|
|
|
$dumper->dump( true );
|
2005-10-16 17:33:41 +00:00
|
|
|
} else {
|
2008-06-04 01:48:25 +00:00
|
|
|
$dumper->progress( <<<ENDS
|
2005-10-16 17:33:41 +00:00
|
|
|
This script postprocesses XML dumps from dumpBackup.php to add
|
|
|
|
|
page text which was stubbed out (using --stub).
|
|
|
|
|
|
|
|
|
|
XML input is accepted on stdin.
|
|
|
|
|
XML output is sent to stdout; progress reports are sent to stderr.
|
|
|
|
|
|
|
|
|
|
Usage: php dumpTextPass.php [<options>]
|
|
|
|
|
Options:
|
2006-01-14 05:46:48 +00:00
|
|
|
--stub=<type>:<file> To load a compressed stub dump instead of stdin
|
|
|
|
|
--prefetch=<type>:<file> Use a prior dump file as a text source, to save
|
2010-07-19 18:36:52 +00:00
|
|
|
pressure on the database.
|
2011-07-20 23:06:24 +00:00
|
|
|
(Requires the XMLReader extension)
|
2011-08-22 22:45:22 +00:00
|
|
|
--maxtime=<minutes> Write out checkpoint file after this many minutes (writing
|
2011-10-18 17:31:54 +00:00
|
|
|
out complete page, closing xml file properly, and opening new one
|
2011-08-22 22:45:22 +00:00
|
|
|
with header). This option requires the checkpointfile option.
|
|
|
|
|
--checkpointfile=<filenamepattern> Use this string for checkpoint filenames,
|
2011-10-18 17:31:54 +00:00
|
|
|
substituting first pageid written for the first %s (required) and the
|
2011-08-22 22:45:22 +00:00
|
|
|
last pageid written for the second %s if it exists.
|
2010-07-19 18:36:52 +00:00
|
|
|
--quiet Don't dump status reports to stderr.
|
2005-10-16 17:33:41 +00:00
|
|
|
--report=n Report position and speed after every n pages processed.
|
2010-07-19 18:36:52 +00:00
|
|
|
(Default: 100)
|
2005-12-13 22:26:15 +00:00
|
|
|
--server=h Force reading from MySQL server h
|
2010-07-19 18:36:52 +00:00
|
|
|
--current Base ETA on number of pages in database instead of all revisions
|
|
|
|
|
--spawn Spawn a subprocess for loading text records
|
2015-02-19 23:13:07 +00:00
|
|
|
--buffersize=<size> Buffer size in bytes to use for reading the stub.
|
|
|
|
|
(Default: 512KB, Minimum: 4KB)
|
2010-10-02 21:58:04 +00:00
|
|
|
--help Display this help message
|
2008-06-04 01:48:25 +00:00
|
|
|
ENDS
|
2014-04-23 18:08:42 +00:00
|
|
|
);
|
2005-10-16 17:33:41 +00:00
|
|
|
}
|