Migrating old MoinMoin wikis

Depending on the last version of MoinMoin you used, this could be tricky. The good news is that once you migrate your wiki instance to the version of MoinMoin that we have installed, migration should be a lot easier in the future.

If you know what version of MoinMoin you used previously, then skip to the appropriate section. Otherwise read on, and we will try to help you figure it out.

We will call your MoinMoin data directory $DATA.

Before MoinMoin 1.2

Good luck. You'll have to download MoinMoin 1.2.4 yourself, upgrade to it first, and then remove MoinMoin 1.2.4 and proceed with the next sections. If you have hosted a MoinMoin on an old HCoop server, you almost certainly had a later version of MoinMoin than this.

MoinMoin 1.2 through 1.3.4

If you want to know whether you have at least MoinMoin 1.3.4, check for the existence of the $DATA/plugin/__init__.py file. If you have it, skip this section. Otherwise, continue on.

First, back up your data by making a copy of it.

Then, change to the directory where the migration scripts are located:

$ cd /usr/share/python-support/python-moinmoin/MoinMoin/script/old/migration/

Then, consult /usr/share/doc/moinmoin-common/README.Migration.gz, and figure out which scripts you need to run. Unfortunately, you'll have to either know exactly which version of MoinMoin you were last using, or do some detective work by looking at the migration scripts themselves.

To run an individual script (in this example, the 12_to_13_mig11.py script), do:

$ ./12_to_13_mig11.py $DATA

This brings you up to MoinMoin 1.3.5.

MoinMoin 1.3.5

If you have previously used an old HCoop server, this is most likely the version you last used.

First, change to the directory where the migration scripts are located:

$ cd /usr/share/python-support/python-moinmoin/MoinMoin/script/old/migration/

Then, run just this one migration script:

$ ./152_to_1050300.py $DATA

This brings you up to MoinMoin 1.5.3.

MoinMoin 1.5.3

You have it easy. Just run the following, from any directory.

$CONFIGDIR is the full path to the directory that has your wikidata.py file, without any "~" characters. We will call your Wiki URL (example: wiki.DOMAIN.TLD/) $WIKIURL.

$ cd $CONFIGDIR
$ moin --wiki-url=$WIKIURL migration data

Moin 1.7.x

Remember to make a backup. The 1.7 to 1.9 update is slightly more intrusive than previous updates, and you cannot go back if you screw up!

If you installed moin using moinmoin-install on mire, this is the version you are using. The next version we offer is 1.9.5. To make things easier in the future, we moved the moin install from the local machine to afs. Upgrading your data is similar to previous version, where $CONFIGDIR is the directory containing your wikiconfig.py.

cd $CONFIGDIR
/afs/hcoop.net/common/bin/moin --config-dir=`pwd` --wiki-url=$WIKIURL maint cleancache
/afs/hcoop.net/common/bin/moin --config-dir=`pwd` --wiki-url=$WIKIURL migration data

MoinMoin made a number of changes to their module hiearchy in 1.9, so you'll also need to replace your copy of moin.cgi with the latest version:

cp /afs/hcoop.net/common/app/moin/installed/moin19/share/moin/server/moin.cgi $LOCATION-OF-YOUR-MOIN.CGI

For this release, it is recommended that you copy a new version of the system-wide wikiconfig.py from /afs/hcoop.net/common/app/moin/installed/moin19/share/moin/config/wikiconfig.py and merge the minimal settings needed from your current config. Things to look out for: