Loading...
 
(Cached)

MediaWiki to TikiWiki migration script

Since Tiki4, there is a built-in importer. Please see: MediaWiki importer.



Dmitry Ganin and Medha Parlikar did a migration script from MediaWiki to TikiWiki. The code is attached in this page. Below the documentation of the script.

I plan to study this script as part of my GSOC 2009 project.

Documentation

Migration Scripts

There are several scripts to perform migration from MW to Tiki.

Script name
Location on migrationbox
Description

{Herndon|Orem}_check_tables.pl

/root/migration
(actually can be run from any directory)
Perl script. Extracts text of each MW page from MW DB and check it for incorrect table markup. Outputs found issues to STDOUT. Does not change any data in MW or Tiki databases

{Herndon|Orem}_mw2html.pl

/root/migration
(actually can be run from any directory)
Perl script. Extracts text of each MW page from MW DB, converts it to HTML (with use of CPAN Perl module Text::MediaWikiFormat) and saves converted text to temporary table in MW DB. Temporary table is being
recreated at each run of the script. During conversion to HTML script processes attached files: finds attached files in MW images location, copies found files to ‘files’ subdirectory under base Tiki directory, inserts corresponding record into ‘tiki_wiki_attachments’ table of Tiki DB and inserts HTML link containing attachment ID to the text of converted page.

{Herndon|Orem}_import_mw_pages.php

/var/www/html/migration
(base Tiki directory)
PHP script. Takes HTML text of each page from temporary table created by Perl script and imports page in Tiki with use of functions from standard Tiki library.

import_mediawiki_pages.php

/var/www/html/migration/import
(${tiki_base}/ import)
PHP module containing code used by {Herndon|Orem}_import_mw_pages.php scripts


{Herndon|Orem} - means prefix in filename of script. I didn’t care
about implementation of external configuration file support. I simply
created separate copy of each script per MW instance. The only
difference between Herndon_* and Orem_* are configuration settings -
DB settings and paths. Configuration section containing all settings
can be found at the beginning of each script.

Migration Procedure

  1. Update MW databases and locations on migrationbox with latest dumps and tarballs.
  2. On proddev-wiki grant all privileges on production Tiki DB to MySQL user mw2tiki’@’migrationbox.orm.omniture.com’.
  3. Configure migration Tiki instance on migrationbox to work remotely with production Tiki DB on proddev-wiki (/var/www/html/migration/db/local.php).
  4. Check and correct configuration settings in migration scripts. {Herndon|Orem}_mw2html.pl scripts contain settings for Tiki DB - these settings should be changed to point scripts to production DB.
  5. Shut down apache on wiki to avoid any access to DB by users.
  6. Run _check_tables.pl scripts. Correct detected issues if any.
  7. Run Herndon_mw2html.pl script.
  8. Run Herndon_import_mw_pages.php
  9. Open page ‘Main_Page’ in migration Tiki and rename this page to, for example, ‘DoP_Main_Page’. This is necessary to do to avoid conflict with ‘Main_Page’ from Orem MW.
  10. Run Orem_mw2html.pl script.
  11. Run Orem_import_mw_pages.php script.
  12. Go to Tiki ‘Manage attachments’ page: Press ‘Change all to db’ button.
  13. Migration complete.


{Herndon|Orem}_mw2html.pl scripts output warnings if
can’t find MW attachments.

{Herndon|Orem}_import_mw_pages.php scripts output name of the each
processed page and page names conflicts if any.

So, it’s useful to redirect output of scripts to files or to less command.

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools