Warning

This page is aimed to be a reminder for MoinMoin migration, because each time I need to read a lot of different official documentations and get lost... and finally go back to my own notes. But it's targeted particularly to my own installations. Don't use it if you don't know what you are doing and better check the official documentation.

Note

I will try to update this guide as new MoinMoin versions came out. if it's not done, you can still try to use it as it seems that upgrade is allways the same since the 1.5.x versions.

System notes

Backup

To be able to rollback easily if the migration process fails, I backup all important files

# cd /opt
# mkdir backup-moinmoin
# cd backup-moinmoin
# tar czf moinmoin-1.9.2.tgz <moin-python>
# tar czf moin-share.tgz <moin-share>
# tar czf moin-data.tgz <moin-instance>

Installation

Download

First, you must download the last MoinMoin and extract it

# cd /opt
# wget http://static.moinmo.in/files/moin-1.9.3.tar.gz
# tar xvzf moin-1.9.3.tar.gz

Installation of python files

To limit problems when installing the new version, I simply remove current MoinMoin python files :

# rm -fr <moin-python>

and install the new ones

# cd /opt/moin-1.9.3
# python setup.py install --record=../install-1.9.3.log

This will record information about copied files into file ../install-1.9.3.log

Instances installation

Following steps must be repeated (and adapted) for each instance you run on your server

Installation of WSGI file

Copy new WSGI file to your instance

# cp wiki/server/moin.wsgi <moin-instance>

And edit this file to fill your own parameters, especially the line below

sys.path.insert(0, '<moin-instance>')

Installation and customization of config file

Your wiki configuration is located at <moin-instance>/wikiconfig.py. To use new default settings, it's recommended to install new version which you can find at <moin-share>/config/wikiconfig.py, but I found it simpler (especially if your configuration is complex, with regex and authentication adaptations) to just look at differences between your actual configuration and the new default one, and then add new directives to your config file.

Installation of underlay files

Now we will update the moin underlay files (which are system, help, translations, etc. pages in MoinMoin)

# cd <moin-instance>
# cp -R <moin-share>/underlay underlay/

Migration

Now we will proceed with the migration script that update your page to adapt them to the new syntax (if it has changed)

# cd <moin-instance>
# su - <web-user>
$ moin --config-dir=<moin-instance> --wiki-url=<wiki-url> migration data

Look carefully at the output of the command in case error messages occurs.

You also need to migrate intermap.txt if you haven't changed it (if it's the case, check the official doc)

# cd /opt/moin-1.9.3
# cp wiki/data/intermap.txt <moin-instance>/data/

Fixes

Your MoinMoin instance is now successfully migrated, and should be nearly usable right now, but some fixes are still needed.

Static stuff

Permissions

You also need to fix files permissions to permit access to MoinMoin files to you user webserver.

# chown -R <web-user>:<web-group> <moin-instance>
# chmod -R ug+rwX <moin-instance>
# chmod -R o-rwx <moin-instance>
# chmod -R a+rwX <moin-instance>

Cache

Delete cached data with the following command

# moin --config-dir=<moin-instance> --wiki-url=<wiki-url> maint cleancache

Language

If you're running MoinMoin in another language, don't forget to visit the LanguageSetup to install the needed language pack(s).

Plugins

Don't forget to update all plugins (macro, actions, filter...) you can have installed on your MoinMoin instance.


That's all for me.... don't forget to reload/restart your Apache webserver

MoinMoin: EricVeirasGalisson/MoinMoinMigration (last edited 2010-09-20 13:58:49 by EricVeirasGalisson)