Manual:DumpBackup.php/de

Details
dumpBackup.php file erstellt einen XML-Dump als Export oder Backup. XML-Dumps enthalten die Wiki-Inhalte (Wiki-Seiten mit allen Revisionen) ohne die Website-bezogenen Daten. DumpBackup.php erstellt kein vollständiges Backup der Wiki-Datenbank. Der Dump enthält keine Benutzerkonten, Bilder, Bearbeitungsprotokolle, gelöschte Revisionen usw. Sobald der Dump abgeschlossen ist, kannst du den XML-Dump importieren.

Beispiele


Allgemeine Beispiele
Du musst einen Namen für den Datendump wählen.

Zum Beispiel speichert der Benutzer hier den gesamten Revisionsverlauf (--full) in der Datei ' ':


 * Weitere Details zu dieser beispielhaften dump.xml findest du im ausführlichen Beispiel unten.

Du kannst den Datendump auf einen Namensraum begrenzen. Im folgenden Beispiel erhältst du nur Vorlagen in der aktuellen Revision:

oder Vorlagen mit allen Revisionen:

Mehrere Namenräume einschließen:

Beispielverwendung eines Plugins:

 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

oder

 php dumpBackup.php \ --plugin=MathMLFilter:../extensions/MathSearch/maintenance/MathMLFilter.php \ --current \ --filter=namespace:NS_MAIN \ --filter=mathml \ --quiet

Die Option  kann mit  genutzt werden.

Um Dateien mit  einzuschließen:

 php dumpBackup.php \ --full \ --include-files \ --uploads \ --output=gzip:/dumps/abstract.xml.gz \ --quiet

Auch die Option   muss genutzt werden, ansonsten werden keine Dateien eingeschlossen.



Detailiertes Beispiel
In diesem Beispiel ist grüner Text der Text den du eingibst.


 * 1) Redirect to the maintenance folder using the cd command.  The location of your maintenance folder will vary from this example.
 * 1) Type in php dumpBackup.php --full > dump.xml and press enter.  A long list of code is created, similar to the example below.

The new xml file will be created in the maintenance folder (you may need to refresh your SCP to see the xml file).

Optionen
Ab MediaWiki :

 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.

Usage: php dumpBackup.php [ ] Actions: --full     Dump all revisions of every page. --current  Dump only the latest revision of every page. --logs     Dump all log events. --stable   Stable versions of pages? --pagelist= Where is a list of page titles to be dumped --revrange Dump specified range of revisions, requires revstart and revend options. Options: --quiet    Don't dump status reports to stderr. --report=n Report position and speed after every n pages processed. (Default: 100) --server=h Force reading from MySQL server h  --start=n   Start from page_id or log_id n  --end=n     Stop before page_id or log_id n (exclusive) --revstart=n Start from rev_id n  --revend=n    Stop before rev_id n (exclusive) --skip-header Don't output the header --skip-footer Don't output the footer --stub     Don't perform old_text lookups; for 2-pass dump --uploads  Include upload records without files --include-files Include files within the XML stream --conf= Use the specified configuration file (LocalSettings.php)

--wiki= Only back up the specified

Fancy stuff: (Works? Add examples please.) --plugin= [: ]  Load a dump plugin class --output= :     Begin a filtered output stream; s: file, gzip, bzip2, 7zip --filter= [: ] Add a filter on an output branch --7ziplevel=<0-10>         Level of 7zip compression (0 - no compression is default)

This script connects to the database using the username and password defined by and, which are normally set in. Usually $wgDBadminuser is a user with more privileges than the one in, but for running  no extra privileges are required, so the usernames and passwords may be the same. If the variables are not set,  will fail when trying to connect to the database:

 $ php dumpBackup.php --full DB connection error: Unknown error

Anmerkungen
The 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.



Fehlermeldungen
If you are not in the correct folder, you will receive this message:

 No input file specified.

The dumpBackup script says " " when the parameter after "--report" evaluates as 0 or not-a-number. The fix is to run dumpBackup without the "--report" option; then dumpBackup will print a status line every 100 pages processed.



Empfohlene Konfigurationseinstellungen

 * should be set to 0, to avoid inserting all revisions into the object cache. Most of them won't benefit from being stored in the cache because your readers normally won't view random old revisions of pages on your wiki.



Siehe auch

 * Dumps/Software dependencies
 * Examples and wrapper scripts
 * xmldumps-backup contains scripts used by the Wikimedia Foundation, python scripts have some documentation; see also wikitech:Category:Dumps (some examples on Dumps/Rerunning_a_job for now).
 * Wikia's WikiFactory/Dumps
 * Examples and wrapper scripts
 * xmldumps-backup contains scripts used by the Wikimedia Foundation, python scripts have some documentation; see also wikitech:Category:Dumps (some examples on Dumps/Rerunning_a_job for now).
 * Wikia's WikiFactory/Dumps