Forum:How to: Export all pages from each namespace

This method is shared in the hope that (i) someone else finds it useful and (ii) someone else might point me to an even better way of getting the same result.
 * Goal:Export all pages from a wiki for subsequent import into another wiki.
 * Problem:
 * Special:Export requires a list of pages that is (i) one page per line and (ii) no trailing whitespace after each page name.
 * There is no one category that all pages at a wiki belong to and then some pages do not belong to any category at all.
 * Special:AllPages output is in 3 columns and does not prepend each page name with the namespace prefix.
 * The list produced by Special:AllPages cannot simply be cut and paste into Special:Export and achieve the expected result.

One solution

 * 1) Repeat the following steps for each namespace at your wiki, appending each block of HTML as you go
 * 2) Use Special:AllPages and select one namespace at a time.
 * 3) View the HTML source of the resulting list and copy just the HTML for the table of results. (This is very easy to do if you can use Firebug to select the   element and then "Copy inner HTML" to copy just the table of results.
 * 4) Paste the copied HTML into a file editor
 * 5) Save the concatenation of pasted HTML as a file named "inner-html" or similar
 * 6) Copy the following awk script into a file editor and save it as file name "a.awk" or similar
 * 7) At a shell command line run the command:
 * 8) Open the file "export-list" for edit and copy that list of pages to Special:Export - this very nicely provides the namespace prefix as well as one page per line with no trailing whitespace
 * 9) Export to a file and then proceed with import as usual.

enjoy! -- najevi 00:48, September 29, 2010 (UTC)