Migrating From One Deki Instance To Another

     

    First, create a fresh install of MindTouch Deki on a server (installation guides can be found at wiki.mindtouch.com).

     

    Backing up your database
    Edit section

    You can do this from command line by issuing the following command:

    # mysqldump -udbusername -p db_name > db_name.sql 

    Note:  If you have a multi-tenant installation of Deki, you have multiple databases and will need to back up each database separately.

    Backing up your attachments
    Edit section

    # cd /path/to/dekiwiki/;
    # tar cvzpf attachments.tar.gz attachments

     

    Move files to new instance

    Copy the backed-up files via scp to the new server:

    # scp /path/to/db_name.sql root@destination.server:/path/to/deki
    
    # scp /path/to/attachments.tar.gz root@destination.server:/path/to/deki
    
    # scp /path/to/dekiwiki/LocalSettings.php root@destination.server:/var/www/dekiwiki/
    
    # scp /etc/dekiwiki/mindtouch.deki.startup.xml root@destination.server:/etc/dekiwiki/

      

    Restoring your database

    First, you will need to drop the default database:

    mysqladmin -udbusername -pdbuserpassword drop db_name;
    

     

    Recreate the database, and restore the backup by typing the following commands:

    # mysql -udbusername -pdbuserpassword 
    mysql> create database wikidb default charset utf8;
    

     

    Exit mysql, and restore the database by entering the following:

    # mysql -udbusername -p db_name < db_name.sql
    

    Note: If you have a multi-tenant installation of Deki, you have multiple databases and will need to restore each database separately.

    After restoring it, a little cleanup work is necessary.

    # mysql -udbusername -pdbuserpassword wikidb
    
    mysql> UPDATE config SET config_value='fs' where config_key='storage/type'; 
    mysql> INSERT INTO config (config_key, config_value) VALUES ('storage/fs/path', '/var/www/dekiwiki/attachments'); 

     

    Exit mysql, and change directory to /var/www/dekiwiki/maintenance, and run the following:

    # php update-db.php
    

     

    Rebuild the stored procedures by entering the following command:

    # cat /var/www/dekiwiki/maintenance/archives/funcs-util.sql | sed -e 's/{$wgDBadminuser}/wikiuser/' | mysql -udbusername -pdbuserpassword wikidb 
    

     

    Restoring your attachments
    Edit section

    # cd /path/to/deki/;
    # tar xvzpf attachments.tar.gz
    # chown -R dekiwiki /var/www/dekiwiki/attachments 
    

     

    Finally, restart Deki:

    # /etc/init.d/dekiwiki restart
    

     

    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by