Back up this wiki

From Rpcvdraft

Chris put this information here to try out. --Admin 09:35, 1 January 2008 (EST)

Backup a wiki instructions

You may wish to save a copy of your wiki's articles as a backup or to copy them to another wiki. You can do this by exporting your pages in XML format. The quickest way to do this is by using the special pages Special:Allpages and Special:Export.

  1. In the toolbox in the left-hand sidebar, click "Special pages."
  2. In the list of special pages, click "All pages."
  3. From the "Namespace" drop-down menu, select the namespace you wish to export. "(Main)" is selected by default.
  4. Highlight and copy the resulting list of article names.
  5. Edit the result such that each article's name is on its own line. For example, using Microsoft Word, globally replace "tab" characters with "paragraph" characters.
    • Make sure there are no blank lines, especially at the end of the list.
    • If you selected any namespace other than (Main), each article name must be preceded with its namespace name and a colon. For example, the article RobKohr in the User: namespace would have to be listed as User:RobKohr. Do this for every article name in the list.
    • To create a complete copy, you should export every article in every namespace that you've modified from the default installation, including associated Talk: namespaces (Category Talk:, User Talk:, etc).
  6. Highlight and copy the new, reorganized article list.
  7. Navigate back to the list of Special pages
  8. In the list of special pages, click "Export pages."
  9. Paste the reorganized article list into the Export text box.
  10. Check or uncheck the checkbox "Include only the current revision, not the full history," as you prefer.
  11. Click "Submit Query."

The result is an XML file containing the latest version of all your pages. The file can be saved from your browser and later imported into this or another MediaWiki wiki using Special:Import. (For example, using Internet Explorer, go to the File menu and select "Save As..." to save the XML file as a .xml document.) You may wish to save a copy of your wiki's articles as a backup or to copy them to another wiki. You can do this by exporting your pages in XML format. The quickest way to do this is by using the special pages Special:Allpages and Special:Export.

  1. In the toolbox in the left-hand sidebar, click "Special pages."
  2. In the list of special pages, click "All pages."
  3. From the "Namespace" drop-down menu, select the namespace you wish to export. "(Main)" is selected by default.
  4. Highlight and copy the resulting list of article names.
  5. Edit the result such that each article's name is on its own line. For example, using Microsoft Word, globally replace "tab" characters with "paragraph" characters.
    • Make sure there are no blank lines, especially at the end of the list.
    • If you selected any namespace other than (Main), each article name must be preceded with its namespace name and a colon. For example, the article RobKohr in the User: namespace would have to be listed as User:RobKohr. Do this for every article name in the list.
    • To create a complete copy, you should export every article in every namespace that you've modified from the default installation, including associated Talk: namespaces (Category Talk:, User Talk:, etc).
  6. Highlight and copy the new, reorganized article list.
  7. Navigate back to the list of Special pages
  8. In the list of special pages, click "Export pages."
  9. Paste the reorganized article list into the Export text box.
  10. Check or uncheck the checkbox "Include only the current revision, not the full history," as you prefer.
  11. Click "Submit Query."

The result is an XML file containing the latest version of all your pages. The file can be saved from your browser and later imported into this or another MediaWiki wiki using Special:Import. (For example, using Internet Explorer, go to the File menu and select "Save As..." to save the XML file as a .xml document.)


Backing up your Wiki discussion

I found out a way to do it: You can Export all your pages to XML using Special:Export for backup purposes:

  1. Just click on Special, list all pages
  2. copy the result
  3. edit the result to put each page name on it's own line (In MsWord, just do a replace tabs w/ paragraph end)
  4. Paste that in Export's list area.

Voila: A huge XML file with the latest version of all your pages. That XML file can be saved from your browser and later imported using Special:Import

PS: You have to do it for each namespace you want to backup (usually just templates, talk and Main). Unfortunately it does NOT backup image files, just their page.

Template:Grin Renmiri 16:54, 2 April 2006 (PDT)

Thanks Renmiri, thats excellent! -Rob
  • If you have to export changed messages and articles and categories, you have a big work to do. Good luck with this!
This works, but for articles in any namespace other than Main, you have more work to do. You have to lead each line with the namespace's name and a colon, just as you would if it were inside a wikilink. So, for instance, to back up the Template namespace, you'd have to precede each article name with Template:. Which can be a nuisance if you've got a lot of articles in namespaces other than Main to back up.
And you probably do. Your wiki may contain important data in Category:, Help:, Project:, Talk:, Template:, User: or the associated Talk namespaces (Template Talk:, User Talk:, etc.). Don't forget these. —Stormraven 15:26, 8 February 2007 (EST)
Please see the new Help document Help:Backing up your wiki. :) —Stormraven 13:45, 27 February 2007 (EST)
Personal tools