Backing up the wiki

Jump to navigation Jump to search


You can easily generate a database dump and file dump using Save the Web Project's WikiTeam3 Python script, (full instructions are at that link).

 Windows: When using --images, because NTFS does not allow characters such as :*?"<>| in filenames, some files may not be downloaded, please check the errors.log file.

e.g. wikiteam3dumpgenerator WIKI_URL --xml --xmlrevisions --images --bypass-cdn-image-compression --force

To dump a private wiki you will have to use a login that has at least read permission on the wiki.

e.g. wikiteam3dumpgenerator WIKI_URL --xml --xmlrevisions --images --bypass-cdn-image-compression --force --user USER --pass PASSWORD
If that doesn't work. Login with a web browser, save the site cookies in Netscape format to cookies.txt, and add option --cookies cookies.txt

  • --xml exports an XML dump, uses Special:Export by default when no other xmldump method is specified.
  • --xmlrevisions uses API:Allrevisions xmldump method. Recommended as it's quicker and puts almost no pressure on the MediaWiki backend compared to Special:Export.
  • --images generates an image dump
  • --bypass-cdn-image-compression needed with Miraheze
  • --force generates a dump even if there is one already at Internet Archive

If you encounter any problem with running the script, please raise a new issue at the Save the Web Project's saveweb/WikiTeam3 GitHub repository.

Restoring from backup

See, specifically Manual:Importing XML dumps and Manual:importImages.php.

External links