Friday, July 23, 2010

Mediawiki Migration

This is again I have done as part of our datacenter movement from India to US. We are on the recent release of mediawiki (1.15.2), I just need to make the ditto box in US before shutting down the old one in India. There are plenty of help articles on internet which helped me to do the same, again I am detailing here because of my future reference and ofcourse may help somebody like you.

The following are the details of the software versions installed on both the boxes.

MediaWiki 1.15.2
PHP 5.1.6 (apache2handler)
MySQL 5.0.77

Lets start the detailed step of the upgrade as follows,

On Old Server:-
  1. Shutdown apache server for stoping further updates to the wiki (#service httpd stop)
  2. Backed up all the content of the web folder of apache (mediawiki files) (#tar -zcvf wiki.tar.gz /var/www/html/wiki)
  3. Copy the tar file to the new server
  4. Dump the MySQL database (#mysqldump -u (username) -p (password) wikidb >backup-wikidb.sql )
  5. Copy the dump file to the new server
On the New Server:-
  • Restore the database from the backup-wikidb.sql file (sql>mysql -u (username) -p (password) wikidb )
  • Untar the copied wiki.tar.gz file and copy it in to the documentroot of apache (#tar -zxvf wiki.tar.gz; cp -R wiki /var/www/html)
  • Edit the Localsettings.php and Adminsettings.php files to match the wikidb and wiki user credentials
  • Restart apache server (#service httpd restart)
  • If everything went well go and browse the wiki with existing user credentials.
Yes we have finished the movement of mediawiki from old server to new server...!!!

No comments:

Post a Comment