Title

Getting MindTouch Deki Wiki working on Windows Server

This site is intended to read more like a series of instructions than a blog, so I would recommend using the Table of Contents on the right to navigate.

Thursday, March 23, 2017

Migrating Site Data

This is how you export data from one instance of MindTouch Core (Deki Wiki) and import it into another.  These instructions are based on moving from version 8.08.2 to 10.1.4.  These are not instructions for an in-place upgrade.

Export Data from the Old Wiki

You may have to search for the folders below because they may be in different locations depending on how Deki was installed and which version you were using.
  • Make a copy of the attachments folder.
    • It may be in web\attachments.
  • Make a copy of LocalSettings.php and AdminSettings.php.
    • You may not have AdminSettings.php if you started with Deki 1.9.0 or later, so just skip it if it doesn't exist.
  • Make a copy of mindtouch.host.bat.
    • It may be in bin or web\bin.
  • Make a copy of mindtouch.deki.startup.xml.
    • It may be in c:\dekiwiki, config, or web\config.
  • Make a copy of any other customizations you have, such as a custom favicon.ico file.
  • Export your MySQL database.
    • Open a command prompt.
    • Go the the MySQL\bin folder.
      • For example: cd\Program Files\MySQL\MySQL Server 5.1\bin
    • Run this command: mysqldump -u root -p wikidb > [exportfile].sql
      • Substitute [exportfile] with where you want to put the file.
      • You can substitute "root" with a different MySQL user name if you have one.

Install a New Wiki

Follow the instructions here to install a new instance of Deki Wiki, including going through the setup process.  Use the same MySQL password as the previous instance.

Import Data into the New Wiki

  • Stop mindtouch.host.exe on the new instance if it's running.
    • If you have mindtouch.host.bat running in a visible console window, just press Ctrl+C and enter Y when it asks you to terminate the batch job.
    • If it's running from a scheduled task like the instructions said, open Task Manager, go to Details, select mindtouch.host.exe, and then click End Task. 
  • Delete anything in the existing attachments folder and copy the contents of the old one in.
  • Start MySQL Workbench and connect to the instance.
    • Under Schemas on the left, right click on wikidb and choose Drop Schema.
    • Go to Server > Data Import in the menu.
      • Select Import from Self-Contained file and choose the file you made with mysqldump earlier.
      • Next to Default Target Schema, click New and type wikidb.
      • Click Start Import.
      • Close the tab when it's done.
    • Next to Schemas on the left, click the refresh button.  You should see wikidb appear.
    • Under Schemas on the left, expand wikidb > Tables > config.
      • Right click and choose Select Rows - Limit 1000.
      • Find any paths in the config_value column and correct them if necessary.
        • For example, change the value for storage/fs/path and make sure it matches your attachments folder.
      • Click the Apply button to the lower right to save the changes.
  • This isn't strictly necessary, but open mindtouch.deki.startup.xml from the new installation.
    • Find <indexer><path.store> and change it to the path where you want to store the search index data.
      • By default Deki defaults to "\bin\cache\luceneindex\\$1", which basically becomes c:\bin\cache\luceneindex.
      • Change it to something more sensible but still end it with "\$1".
      • You can delete the c:\bin folder it already created.
  • Open the command prompt.
    • Go to the maintenance folder in Deki.
      • For example: cd\inetpub\wwwroot\maintenance
    • Run php update-db.php
      • This may take a few minutes depending on the size of your site. 
  •  Restart mindtouch.host.bat.

No comments:

Post a Comment