Tech:Dumping a wiki
- To make a dump (example allthetropeswiki)
php5 /srv/mediawiki/w/maintenance/dumpBackup.php --current --wiki allthetropeswiki > /mnt/mediawiki/uploads/common/dumps/allthetropes/dump.xml
Note using --full
is resource intensive. Also change the name of the wiki as appropriate based on the database table name for the wiki you wish to dump.
- To turn dump into compressed zip
zip /mnt/mediawiki/uploads/common/dumps/allthetropes/allthetropes10.zip /mnt/mediawiki/uploads/common/dumps/allthetropes/dump.xml
Note - Zip format is least intensive on the processor. Tar.gz is better but more intensive, and 7zip is best compression but extremely resource intensive. Zip is preferred unless max compression is absolutely required. (Zip will do in most standard cases)
- To remove a dump
rm /mnt/mediawiki/uploads/common/dumps/allthetropes/dump.xml
Note - Unless there is a reason to keep the dump files around (such as needing backups for a server move), they should be removed ASAP for space reasons.
- To remove the zip
rm /mnt/mediawiki/uploads/common/dumps/allthetropes/allthetropes10.zip
Note - Same as the uncompressed dump, these should be removed when no longer required to preserve server space.