Manual:dumpTextPass.php

This page is a translated version of the page Manual:DumpTextPass.php and the translation is 35% complete.
MediaWiki バージョン:
1.6

詳細

dumpTextPass.php file is a maintenance script that postprocesses XML dumps from dumpBackup.php to add page text which was stubbed out (using --stub).

オプション/引数

オプション 説明 必須かどうか
--stub To load a compressed stub dump instead of stdin. Input format is <type>:<file>. 省略可能
--prefetch Use a prior dump file as a text source, to save pressure on the database.
Input format is <type>:<file>.
省略可能
--maxtime Write out checkpoint file after this many minutes (writing out complete page, closing xml file properly, and opening new one with header). This option requires the checkpointfile option.
Number of minutes should be passed as value for this option.
省略可能
--checkpointfile Use this string for checkpoint filenames, substituting first pageid written for the first %s (required) and the last pageid written for the second %s if it exists. 省略可能
--quiet Don't dump status reports to stderr. 省略可能
--report Report position and speed after every n pages processed. 省略可能
--server Force reading from MySQL server h 省略可能
--full Dump all revisions of every page 省略可能
--current Base ETA on number of pages in database instead of all revisions 省略可能
--spawn Spawn a subprocess for loading text records 省略可能
--buffersize Buffer size in bytes to use for reading the stub. (Default: 512KB, Minimum: 4KB) 省略可能
--help ヘルプ メッセージを表示 省略可能

使用法

php maintenance/dumpTextPass.php [ --stub| --prefetch| --maxtime| --checkpointfile| --quiet| --report| --server| --full| --current| --spawn| --buffersize| --help ]

First generate the dump through dumpBackup.php .

Terminal
dump.xml
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
  <siteinfo>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>1</id>
      <timestamp>2021-10-26T00:25:37Z</timestamp>
      <contributor>
        <username>MediaWiki default</username>
        <id>2</id>
      </contributor>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" location="tt:1" id="1" />
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
    <revision>
      <id>118</id>
      <parentid>1</parentid>
      <timestamp>2021-10-26T12:23:48Z</timestamp>
      <contributor>
        <username>Jay</username>
        <id>1</id>
      </contributor>
      <minor/>
      <comment>Protected "[[Main Page]]" ([Edit=Allow only administrators] (indefinite))</comment>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" location="tt:1" id="1" />
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
  </page>
</mediawiki>

Now add the text through this script.

Terminal
dumpWithText.xml
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
  <siteinfo>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>1</id>
      <timestamp>2021-10-26T00:25:37Z</timestamp>
      <contributor>
        <username>MediaWiki default</username>
        <id>2</id>
      </contributor>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" xml:space="preserve">&lt;strong&gt;MediaWiki has been installed.&lt;/strong&gt;

Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.

== Getting started ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]</text>
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
    <revision>
      <id>118</id>
      <parentid>1</parentid>
      <timestamp>2021-10-26T12:23:48Z</timestamp>
      <contributor>
        <username>Jay</username>
        <id>1</id>
      </contributor>
      <minor />
      <comment>Protected &quot;[[Main Page]]&quot; ([Edit=Allow only administrators] (indefinite))</comment>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" xml:space="preserve">&lt;strong&gt;MediaWiki has been installed.&lt;/strong&gt;

Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.

== Getting started ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]</text>
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
  </page>
</mediawiki>

関連項目