Jump to content

Incubator:Importing from Incubator

From Wikimedia Incubator
(Redirected from Incubator:Exporting)

What to do when a subdomain is created?

Do not copy pages from the test at Incubator to the new site. This is illegal. These pages must be imported from Incubator so the edit history of each page is preserved. For this, you have to be member of the global new wiki importers user group (list of members).

Note that it is technically impossible to edit Incubator test wikis for which separate subdomains exist, so you will not miss any page or change while importing.

How to import

[edit source]
  1. Get your data (note: it is not yet needed to register) — there are different possibilities:
    • The normal MediaWiki way
      1. Go on Incubator (this wiki) to Special:Prefixindex.
      2. Copy the page names of all pages of your test (namespaces Main, Talk, Template, Template talk, Category, Category talk, MediaWiki, MediaWiki talk, Module, Module talk) into the field at Special:Export.
    • The API way
      1. Go to http://incubator.wikimedia.org/w/api.php and get the appropriate parameters.
      2. Copy the lists to a text program which supports utf-8 and regular expressions, then remove the unneeded parts.
      3. Copy the lists (namespaces Main, Talk, Template, Template talk, Category, Category talk, MediaWiki, MediaWiki talk, Module, Module talk) into the field at Special:Export.
    • You can use this tool and remove the numbers in front of the pages names and copy the list to Special:Export. Remember the labs replication lag!
  2. Uncheck "Include only the current revision, not the full history" (IMPORTANT because we need the history)
  3. Click on "export".
  4. Save that file on your computer. (Be sure that it supports utf-8.)
  5. Use this Python script to clean up the resulting XML file.
    • Alternatively, you can do so manually: remove prefixes etc. (e.g. replace "Project/isocode/" and "{{#titleparts: {{PAGENAME}} | 2 }}" with "" to remove prefixes), the easiest way is with regular expressions. (This means removing the prefixes from page titles, links, template transclusions, categories and interwiki links [for non-Wikipedias] from every revision of the page! Failure to do so would result in serious issues that would need the developers to fix!)
  6. Also import Template:INTERWIKI and Module:IncubatorInterwikiEXPORT.
  7. Go on the new wiki to Special:Import. Fill the Import form:
    • Search your computer for the XML file.
    • Check the box "Assign edits to local users where the named user exists locally".
    • Fill the Interwiki prefix: field:
      • When importing from the Incubator, write incubator:.
      • When importing from Multilingual Wikisource, write oldwikisource:.
      • When importing from Beta Wikiversity, write betawikiversity:.
    • Press "Upload file" and wait.
    • If you get an error, check Special:Log/import to check whether or not the upload was successful. Some times it was, even though you get an error, and some times it was partially successful. If it was partial, you might need to remove the uploaded pages from the XML file manually before trying again.
    • Check [[Special:Log/import]] after each time the importing gives an error. In some cases, the same page may be imported twice, or it will give an error multiple times without importing anything. A solution to this is to manually remove the pages that have already been imported from the XML file, and then try to import it again.
  8. Be sure the main page is the correct one, and click a few times on Special:Random to check there are no clear errors. Maybe leave a note that wiki users can contact you if something is missing.
  9. If you imported CSS/JS pages in the MediaWiki namespace, see [1].
  10. Database tables are often incomplete following importing, so run the script rebuildall.php or submit a Phabricator task requesting that it be run on the wiki (add the "Wikimedia-maintenance-script-run" tag to attract the right eyes to the task). You can also run updateArticleCount.php immediately afterwards if you'd like, but there is no need to request that someone else run it, since things should already be set up to run that script daily on the wiki.
  11. Update Incubator:Site creation log.
  12. You should notify test-wiki contributors of the new subdomain.
  13. Wait a few hours or days, to make sure there are no missing pages or other problems. If not:

See also

[edit source]