Wiki Backup

Download

http://wiki.limewire.org/backup/wiki_export.current.xml.gz

Approximately 6.1 MB.

License

Content available under a Creative Commons Attribution 3.0 license.

About

The LimeWire Wiki is running MediaWiki software. Every 24 hours, a script on limewire.org copies the contents of the MediaWiki page database to an XML file. You can download a current copy of this XML file from the link above. It includes the content of each wiki page, including all past revisions of all pages. As XML is just text, it acts as a human-readable backup of this wiki's content.

You can also use the XML file to copy this wiki's content to another installation of MediaWiki software, running on a Web server or personal computer.

To do this, first make sure your AdminSettings.php file is ready to go. It should be in the base directory of your MediaWiki installation. The MediaWiki software provides a sample named AdminSettings.sample—you can just copy this file and modify it.

Then, go into the maintenance directory and run the following command:

php importDump.php /path/to/wiki_export.current.xml.gz

Trying It Out

Here are some example steps copying the LimeWire Wiki to a personal computer running Windows.

Setup XAMPP

First, install XAMPP to get Apache, MySQL, and PHP all at once. Double-click the download file like xampp-win32-1.6.6a-installer.exe to start the setup wizard. The defaults are fine. At the end, the wizard will ask you if you want to start the XAMPP control panel now. Choose Yes. In the control panel, click the Start buttons for Apache and MySql.

Image:xampp.png

You've got a working Web server on your computer. A file with a path like this:

C:\xampp\htdocs\hello.txt

Has this URL you can browse:

http://localhost/hello.txt

PHP is also installed. Go to the folder where php.exe is located and ask for its version with a command like this:

C:\xampp\php>php.exe --version
PHP 5.2.5 (cli) (built: Nov  8 2007 23:18:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
	with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
	with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies

Setup MediaWiki

Next, follow the MediaWiki Installation Guide to get MediaWiki. Download a file with a name like mediawiki-1.12.0rc1.tar.gz, and use a program like 7-Zip to remove the gzip and tar packaging. Inside is a folder with a name like mediawiki-1.12.0rc1. In this example, we'll rename that folder wiki and move it into htdocs. This gives files in the folder paths like these:

C:\xampp\htdocs\wiki\COPYING
C:\xampp\htdocs\wiki\wiki.phtml

Point your browser to MediaWiki's configuration directory:

http://localhost/wiki/config/

Green text on the installation page should say Environment checked. You can install MediaWiki.

In the Site config section beneath that, fill out the Wiki name: and Contact e-mail: boxes. You can leave the Admin username: as WikiSysop, but have to choose a password. In the Database config section, leave the defaults but type a password there also. Check the Use superuser account box. By default, MySQL has a user named root with a blank password. This is not secure, but sufficient for this demonstration.

Those are all the values we need to change. Scroll to the bottom of the page and click the large Install MediaWiki! button.

The next page should have green text that says the installation was successful, and a note about moving the file LocalSettings.php from config to its parent directory. Do that, and log in as WikiSysop. At this point, you can use MediaWiki.

Specify Administrator Settings

In the wiki folder, rename MediaWiki's file AdminSettings.sample to AdminSettings.php, and open it up. Change these two lines to match your MySQL user, like this:

$wgDBadminuser      = 'root';
$wgDBadminpassword  = '';

Import the Data

Back on the command prompt, we need to have PHP run the script importDump.php, giving it the LimeWire Wiki download file wiki_export.current.xml.gz. The paths to php.exe and importDump.php are like this:

C:\xampp\php\php.exe
C:\xampp\htdocs\wiki\maintenance\importDump.php

Download wiki_export.current.xml.gz and place it next to importDump.php. Navigate the command prompt into the maintenance folder, and execute a command like this:

C:\xampp\htdocs\wiki\maintenance>..\..\..\php\php.exe importDump.php wiki_export.current.xml.gz

Be patient, as the import operation may take a long time. To go faster, you can use 7-Zip to unzip the file, making a 50 MB text file with the name wiki_export.current.xml. Feed that to importDump.php instead.

When it's done, the command prompt will look like this:

...
1200 (1.48 pages/sec 10.35 revs/sec)
1300 (1.50 pages/sec 10.32 revs/sec)
1400 (1.58 pages/sec 10.38 revs/sec)
Done!
You might want to run rebuildrecentchanges.php to regenerate
the recentchanges page.

C:\xampp\htdocs\wiki\maintenance>

What You Get

You get:

  • All the pages, each with their complete revision history.

You don't get:

  • The front page of the wiki, Main Page, which already exists in the destination wiki. It's possible the import script doesn't overwrite existing pages.
  • Users, with email addresses and passwords.
  • Images.
  • Linked files, obviously.
  • Pages that LimeWire Wiki sysops have deleted. They aren't part of the XML file and don't show up in the destination wiki's delete log.