GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing www.mediawiki.org — Manual:dumpBackup.php - MediaWiki
DetailsThe dumpBackup.php file creates an XML dump for export or backup. XML dumps contain the content of the wiki (wiki pages with all their revisions), without the site-related data. DumpBackup.php does not create a full backup of the wiki database, the dump does not contain user accounts, images, deleted revisions, etc.[1] Once the dump is completed, you can import the XML dump. ExamplesGeneral examplesYou must choose a name for the data dump. For example, with this command, you are saving the revision history of all pages ( php dumpBackup.php --full > pagedump.xml You can also include the uploaded files by doing: php dumpBackup.php --full --include-files --uploads > page-and-filedump.xml
You can restrict the data dump to one namespace. In this example, there are only templates with their current revision: php dumpBackup.php --current --quiet --filter=namespace:10 > templates.xml or templates with all of their revisions: php dumpBackup.php --full --quiet --filter=namespace:10 > templates.xml To include multiple namespaces with their current revision: php dumpBackup.php --current --quiet --filter=namespace:10,11 > templates_plus_template_talk.xml To also include files when filtering by certain namespaces: php dumpBackup.php --current --quiet --filter=namespace:0,1,6 --include-files --uploads > main_plus_talk_plus_files.xml Example usage of a plugin: php dumpBackup.php \ --plugin=AbstractFilter:extensions/ActiveAbstract/AbstractFilter.php \ --current \ --output=gzip:/dumps/abstract.xml.gz \ --filter=namespace:NS_MAIN \ --filter=noredirect \ --filter=abstract \ --quiet or php dumpBackup.php \ --plugin=MathMLFilter:../extensions/MathSearch/maintenance/MathMLFilter.php \ --current \ --filter=namespace:NS_MAIN \ --filter=mathml \ --quiet The To php dumpBackup.php \ --full \ --include-files \ --uploads \ --output=gzip:/dumps/abstract.xml.gz \ --quiet The Detailed exampleIn this example Green text is text you type in.
OptionsAs of MediaWiki 1.43.x: $ php maintenance/run.php dumpBackup --help
This script dumps the wiki page or logging database into an
XML interchange wrapper format for export or backup.
XML output is sent to stdout; progress reports are sent to stderr.
WARNING: this is not a full database dump! It is merely for public export
of your wiki. For full backup, see our online help at:
https://www.mediawiki.org/wiki/Backup
Usage: php maintenance/run.php dumpBackup [OPTION]...
Script runner options:
--conf <CONF>: Location of LocalSettings.php, if not default
--globals: Output globals at the end of processing for debugging
--help (-h): Display this help message
--memory-limit <MEMORY-LIMIT>: Set a specific memory limit for the
script, "max" for no limit or "default" to avoid changing it
--profiler <PROFILER>: Profiler output format (usually "text")
--quiet (-q): Whether to suppress non-error output
--server <SERVER>: The protocol and server name to use in URLs, e.g.
https://en.wikipedia.org. This is sometimes necessary because server
name detection may fail in command line scripts.
--wiki <WIKI>: For specifying the wiki ID
Common options:
--dbgroupdefault <DBGROUPDEFAULT>: The default DB group to use.
--dbpass <DBPASS>: The password to use for this script
--dbuser <DBUSER>: The DB user to use for this script
Script specific options:
--7ziplevel <7ZIPLEVEL>: 7zip compression level for all 7zip
outputs. Used for -mx option to 7za command.
--current: Dump only the latest revision of every page.
--end <END>: Stop before page_id or log_id n (exclusive)
--filter <FILTER>: Add a filter on an output branch. Specify as
<type>[:<options>]. <types>s: latest, notalk, namespace
--full: Dump all revisions of every page
--include-files: Include files within the XML stream
--logs: Dump all log events
--namespaces: Limit to this comma-separated list of namespace
numbers
--orderrevs: Dump revisions in ascending revision order (implies
dump of a range of pages)
--output (-o) <OUTPUT (-O)>: Begin a filtered output stream; Specify
as <type>:<file>. <type>s: file, gzip, bzip2, 7zip, dbzip2, lbzip2
--pagelist <PAGELIST>: Dump only pages included in the file
--plugin <PLUGIN>: Load a dump plugin class. Specify as
<class>[:<file>].
--report <REPORT>: Report position and speed after every n pages
processed. Default: 100.
--revend <REVEND>: Stop before rev_id n (exclusive)
--revrange: Dump range of revisions specified by revstart and revend
parameters
--revstart <REVSTART>: Start from rev_id
--schema-version <SCHEMA-VERSION>: Schema version to use for output.
Default: 0.11
--skip-footer: Don't output the </mediawiki> footer
--skip-header: Don't output the <mediawiki> header
--stable: Dump stable versions of pages
--start <START>: Start from page_id or log_id
--stub: Don't perform old_text lookups; for 2-pass dump
--uploads: Include upload records without files
This script connects to the database using the username and password defined by $wgDBadminuser and $wgDBadminpassword , which are normally set in LocalSettings.php .
Usually $wgDBadminuser is a user with more privileges than the one in $wgDBuser , but for running $ php dumpBackup.php --full DB connection error: Unknown error NotesThe XML file is sent to standard output (stdout); progress reports are sent to standard error (stderr). These are the default output and the output device for errors. When you call the script from the shell, then both outputs should by default be sent to the shell, meaning: You should see "informational" output and errors directly on screen. Error messagesIf you are not in the correct folder, you will receive this message: No input file specified. The dumpBackup script says " Recommended configuration settings
See also
References
| |||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | |||||||||