Rename a wiki database
This page may be outdated or contain incorrect details. Please update it if you can. |
This document describes a possible approach to renaming a wiki.
This is a Request for comments and has not been reviewed yet.
Assumptions
- The language code of a wiki shall be renamed. The wiki keeps its "class" (e.g. wikipedia, wikiversity, etc).
- The languagecodes "old" and "new" will be used to name the old and new wikis. "newwiki" and "oldwiki" are the names of the new and old databases.
Approach
- Add the new language code and the language name to languages/Names.php
- Create messages/MessagesNew.php and, if necessary, classes/LanguageNew.php
- Add the language code to /home/wikipedia/common/langlist
- Set oldwiki to read-only
- Create a mysql dump of the database oldwiki
- Create a mysql dump of the extstores. Very old wikis will have text records stored in different extstores!
- php maintenance/addwiki.php --wiki=oldwiki new newwiki newwiki new.wikipedia.org
- Set newwiki to read-only
- Import the database dump of the old wiki into the new database.
- Import the extstore dump into the new exstore database.
- Change all settings in InitialiseSettings.php and, if necessary, in flaggedrevs.php etc pp
- Move the images from /mnt/upload6/project/old to /mnt/upload6/project/new and from /mnt/thumbs/project/old to /mnt/thumbs/project/new
- ??? Do we have to do any changes for SUL?
- Update the interwiki cache: php maintenance/dumpInterwiki.php -o cache/interwiki.cdb
- sync-common-all
- Add the new wiki in the DNS zone
- Set newwiki to read-write
- Set up redirects from old.project.org to new.project.org in /home/wikipedia/conf/redirects.conf
- If no other wikis with language code old exist, remove old from /home/wikipedia/common/langlist
- Remove oldwiki from all *.dblist files
open topics
- update Lucene search system
- clean page caches for all projects since the interwiki is incorrect in Squid caches (redirection can handle it though)
- need a script to verify the configuration before and after (compare $_GLOBALS ? ), or use if( $wgDbName == 'oldwiki' || $wgDbName == 'newiki' )
- synchronize the operation with toolserver. We might want them to do the same operation.
- make sure search engines handle the redirection correctly (they should forget about the old page maybe 301 Moved Permanently).
- this procedure should be fully tested
- write a backup plan so we can easily apply it if anything goes wrong.
- optionally clear memcached obsoletes keys