Was this page helpful?

Migrating from MediaWiki to MindTouch Install

    As of July 2, 2010, MindTouch is not currently supporting the MediaWiki Converter due to outstanding issues.  Proceed at your own risk.  We will update this documentation should we support this once again in the future.

     

    Note:

    If your wiki contains private data that should not be sent over the internet, you will need to install a local copy of the MediaWiki-Bridge.  Please follow the documentation at this link in lieu of these steps below - How to Setup a local MediaWiki Bridge

    Requirements

    • You must convert to a fresh installation of MindTouch (either VM or Windows).
    • You must have access to the MediaWiki MySQL database and attachments folder.
    • The MediaWiki converter is based on MediaWiki 1.11. You must upgrade the installation to that version before attempting the conversion.

    Migrating from MediaWiki to MindTouch

    If you have a MediaWiki installation that you'd like to convert to MindTouch this documentation will walk you through it.  One thing that is different about this migration is that it will migrate over users, revisions, files, and templates.  This is typically not true with converters as usually they provide a screen scrape which is not able to pull up old versions of pages or user accounts.  With this conversion process you maintain attribution along with all of the version of your information.  This process will take you about 10 minutes to complete (Larger MediaWiki databases and attachments will extend the length)

    MediaWiki site

    =media_1236631317756.jpg

    Migrating from MediaWiki to MindTouch can be accomplished very easily through a couple of different ways. To get started download the MindTouch Virtual Machine. Once you have downloaded the MindTouch VM, then start it up and pull up shell access to the VM. You'll want to enable SSH in order to make it easier for editing the configuration files. To enable SSH, look at the following tutorial. Also open up shell access to your MediaWiki install. Once you have the MediaWiki shell open, migrate over the files by doing the following:

    Backup Attachments

    cd /mediawikidir/
    tar cvzpf files.tar.gz ./images

    Backup database

    mysqldump -u<user> -p<password> wikidb > ~/mwdb.sql
    tar cvzpf mwdb.tar.gz mwdb.sql

    Transfer files to MindTouch Server

    scp files.tar.gz root@dekiserverip:/root/files.tar.gz
    scp mwdb.tar.gz root@dekiserverip:/root/mwdb.tar.gz

    Go to the MindTouch server and extract the zipped files

    tar xfvz files.tar.gz -C /root/
    tar xfvz mwdb.tar.gz -C /root/

    Then run the following commands on the MindTouch server which will create a database for the MediaWiki mysql backup, this will allow us to reference a local database during the migration

    mysql -uroot -p
    create database mediawikidb;
    exit

    Now that we have a database created, we'll import the backup of the MediaWiki database:

    mysql -u root -p mediawikidb < mwdb.sql

    With the database restored we can now configure and then run the MediaWiki converter which will take the database and the attachments and convert it to the MindTouch database and corresponding attachments. One thing to note is that this will overwrite the current MindTouch database removing all information that is in the database, so make sure this is a clean install or the content in the db isn't needed.

    Configure and Run MediaWiki Converter

    cd /opt/deki/dist
    nano mindtouch.deki.mwconverter.xml

    Change the following values in mindtouch.deki.mwconverter.xml to match your configuration:

    • Change <startup-xml> element to point to the location of the mindtouch.deki.startup.xml file. On a VM installation, use /etc/dekiwiki/mindtouch.deki.startup.xml.
    • Change <uri.converter> element to point to the IP address or FQDN of the MediaWiki-Bridge. To leverage MindTouch's public MediaWiki-Bridge, use http://mwc.mindtouch.com
    • Change <db-server> to the IP address or FQDN of your MySQL server containing the MediaWiki database.
    • Change <db-port> to the port of your MySQL server containing the MediaWiki database
    • Change <db-catalog> to MySQL catalog name for the MediaWiki database.
    • Change <db-user> to an account in your MySQL Database that can read the MediaWiki database
    • Change <db-password> to the password of a MySQL account that can read the MediaWiki database
    • Change <mwrootpage> to the path of a MediaWiki page that should be treated as the MindTouch home page. Default is Main_Page
    • Change <db-userprefix> and <db-prefix> to your MediaWiki database prefix (if any), or blank if none.
    • Change the <image-dir> to the location of your MediaWiki file attachment directory. This directory must be accessible to your VM (copied to a local directory or via a file share mount).

    Here is an example of a configured mindtouch.deki.mwconverter.xml:

    <?xml version="1.0" encoding="utf-8" ?>
    <config>
      <deki>
        <!-- Path to mindtouch.deki.startup.xml -->
        <startup-xml>/etc/dekiwiki/mindtouch.deki.startup.xml</startup-xml>
      </deki>
    
      <!-- MediaWiki configuration settings -->
      <mediawiki>
    
        <!-- MediaWiki URL ex.  http://deki-hayes/config/mw/index.php -->
        <uri.converter>http://mwc.mindtouch.com</uri.converter>
       
        <!-- MediaWiki database connection information -->
        <db-server>localhost</db-server>
        <db-port>3306</db-port>
        <db-catalog>mediawikidb</db-catalog>
        <db-user>root</db-user>
        <db-password hidden="true">password</db-password>
        <db-options>pooling=true; Connection Timeout=5; Protocol=socket; Min Pool Size=2; 
            Max Pool Size=50; Connection Reset=false;character 
            set=latin1;ProcedureCacheSize=25;Use Procedure Bodies=true;</db-options>
       
        <!-- MediaWiki user table prefix.  
        Leave blank if the MediaWiki database tables do not use a prefix -->
        <db-userprefix></db-userprefix>
        <sites>
          <site>
    
            <!-- MediaWiki table prefix.  
            Leave blank if the MediaWiki database tables do not use a prefix -->
            <db-prefix></db-prefix>
           
            <!-- Path of the MediaWiki home page.  
            All other pages will be placed under this page -->
            <mwrootpage>Main_Page</mwrootpage>
    
            <!-- Path to MediaWiki images folder -->
            <imagedir>/mediawiki/files</imagedir>
    
          </site>
        </sites>
      </mediawiki>
    </config>

     

    Now that the xml file has been configured run the following commands to execute the converter.

    Set execute permissions for the MediaWiki Converter

    chmod +x mindtouch.deki.mwconverter.exe

    Stop the MindTouch service

    /etc/init.d/dekiwiki stop

    Launch the MediaWiki Converter

    ./mindtouch.deki.mwconverter.exe

    WARNING: Running the converter will replace your existing MindTouch data.

    Restart MindTouch

    /etc/init.d/dekiwiki restart

    Rebuild the search index by going into the Control Panel -> Maintenance and History -> Cache Management -> Rebuild Search Index

    Success!

    If your MediaWiki conversion is successful you can navigate to your MindTouch install location and see that the content has been migrated over.

    Organization notes:
    Since MediaWiki does not support the notion of a page hierarchy, you may have a large number of pages under the home page. This flat structure can greatly increase the MindTouch navigation panel load time. To avoid this delay, you can either disable the MindTouch navigation panel or reorganize your site to have a page hierarchy.

    To disable the navigation panel, edit /var/www/dekiwiki/LocalSettings.php and set the following:

    $wgNavPaneEnabled = false;
    $wgNavPaneCallEnabled=false;

    To reorganize your site to have a page hierarchy, use the Desktop Connector.

    New MindTouch site

    =media_1236818442920.jpg?revision=1
    Was this page helpful?
    Tag page

    Files 2

    FileVersionSizeModified 
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by