Migrating KnowledgeTree from Windows to Linux
From KnowledgeTree Document Management Made Simple
Steps to perform
The following steps should assist in migrating your existing KnowledgeTree instance from a Windows environment to Linux.
Ensure that you migrate same versions of KnowledgeTree only (eg. 3.6.1 windows to 3.6.1 Linux).
1. Perform a complete backup of your existing KnowledgeTree install, including the database:
http://wiki.knowledgetree.com/Backing_up_and_restoring_KnowledgeTree
2. Save your existing database to a file (e.g. dump.sql):
- a. Click Start, then Run
- b. Type in cmd in the run dialog
- c. Browse to the following location: <KnowledgeTree_Directory>\mysql\bin
- d. Enter in the following command:
- mysqldump -u dmsadmin -p dms > dump.sql
- e. You will now be prompted for a password, enter the MySQL password you set during your KnowledgeTree installation.
- f. This will save the database to "dump.sql", make sure you keep this file in a safe place
3. Working from your Linux environment from now on, perform a full install of KnowledgeTree
4. Copy your documents from the old Windows location to your new Linux environment
5. Drop the new database that was created during this install:
- a. Open a terminal
- b. Browse to the following location: <KnowledgeTree_Directory>/mysql/bin
- c. Enter in the following command:
- ./mysqladmin --socket=../tmp/mysql.sock -u dmsadmin -p drop dms
6. Recreate the database by running the following SQL command:
./mysqladmin --socket=../tmp/mysql.sock -u dmsadmin -p create dms
7. Copy your previous database (dump.sql) to the following location:
<KnowledgeTree_Directory>/mysql/bin
8. Restore your previous database by running this command:
./mysql --socket=../tmp/mysql.sock -u dmsadmin -p dms < dump.sql
You will now be prompted for a password, enter the MySQL password you set during your KnowledgeTree installation.
9. Run the upgrade wizard.
http://locallost:port/setup/upgrade.php
10. You will now need to update paths from previous Windows ones, to Linux paths. Set the paths by running the following SQL commands (replace <KnowledgeTree_Directory> with your actual path):
See steps for starting MySQL
- a. update config_settings set value = "<KnowledgeTree_Directory>/documents" where item = "documentRoot";
- b. update config_settings set value = "<KnowledgeTree_Directory>/var" where item = "vardirectory";
- c. update config_settings set value = "<KnowledgeTree_Directory>/var/log" where item = "logDirectory";
11. Clear your plugin registry by running these SQL commands:
See steps for starting MySQL
delete from plugin_helper;
delete from plugins;
12. Lastly, you will now need to login to the web inteface and update all other relevant paths in:
DMS Administration > System Configuration > General Settings
del.icio.us
reddit

