Was this page helpful?

Migrating from MediaWiki to MindTouch Install using Local Bridge

     

    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.

     

    Setup a local MediaWiki Bridge for migrating data from MediaWiki to MindTouch

    NOTE: this procedure is only necessary if you cannot use http://mwc.mindtouch.com due to privacy concerns.

    To install a private copy of the MediaWiki-Bridge log into the MindTouch VM and run the following commands:

    cd /var/www/dekiwiki/config
     svn co https://svn.mindtouch.com/source/public/mediawiki-bridge/trunk/ mw

     Once the files for the MediaWiki-Bridge have been installed, follow the onscreen installation instructions for installing MediaWiki by navigating to the address below.  MediaWiki is installed as it is utilized by the migration script:

    1. Navigate to http://your-vm-ip/config/mw/config - it may show an error about the config directory not being readable, follow the onscreen steps to ensure that the config directory is readable.  Note that the MediaWiki config directory is located at /var/www/dekiwiki/config/mw/config
    2. Fill out the MediaWiki installation form (call the new database "mediawikidb").  Note:  Make sure to change the "Database Name" to "mediawikidb" within the "Database config" section of this installation form.
    3. Move the generated LocalSettings.php file from /var/www/dekiwiki/config/mw/config to /var/www/dekiwiki/config/mw.

     

    After installing the Bridge using the steps shown above, we need to drop and recreate the database using the command below:

    mysql -u root -p
    drop database mediawikidb;
    create database mediawikidb;
    exit

     

    Now, 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 configure the <uri.converter> element in mindtouch.deki.mwconverter.xml, use http://your-vm-ip/config/mw/index.php.  Set your-vm-ip to either the hostname or IP address of your MindTouch VM; do not use 127.0.0.1 since it will cause subsequent conversion errors.
    • 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
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by