The Road to 1.7
Migrating from MoinMoin 1.6.x to 1.7.x
(see also: Upgrading from 1.5 to 1.6 instructions)
Work-in-progress warning: This page is currently under construction.
If you successfully survived the 1.5 to 1.6 upgrade, you'll be happy to know that upgrading to 1.7 is a relative piece of cake! Only a few configuration changes need to happen.
Modify your farmconfig.py/wikiconfig.py file:
FastCGI has to be configured slightly differently for Windows than it does for Linux/Unix. Open the server_fastcgi.py file located in: D:\Python25\Lib\site-packages\MoinMoin\server\:
the server_fastcgi.py file has been updated to include an optional variable for the port number. For Windows, we need to set that variable. Locate line 50, and change the port = None to the port number you specify in your Apache httpd.conf file. Following the example in the instructions, line 50 should now read Port = 9001.
Running the 'maint cleanpage' command on Windows
You only need to do this if you ran Moin 1.7.0 for a while before upgrading to 1.7.1. If you upgraded straight to 1.7.1 you can ignore this entire process.
There was a small bug in the 1.7.0 release that created an empty edit-log and page directory simply by going to a non-existent page. This bug bit me a few times when I tried to rename an existing page, and found that someone had already tried to visit that URL (even tho it didn't exist yet). The developers included a moin --config-dir=... --wiki-url=... maint cleanpage command to help clean this up. But, as usual, Windows provides a little extra work to get this working.
These instructions assume that you already have Robocopy installed, which you should have anyway for making backups (unless you use something else). Instructions for where to find Robocopy, as well as how to use it is here: HelpOnInstalling/Win32MoinEasyBackup.
First, make a backup. You're about to automate moving a bunch of files around, there's always room for something unexpected to happen and you'll want a backup in case something horrible occurs.
We need to run the script and dump its results to a text file. And of course, being Windows, we need to hard-code the the paths, so we run this (assuming that both moin and python is installed on your D drive) from the commandline:
d:\python25\python d:\python25\Lib\site-packages\MoinMoin\script\moin.py --config-dir=d:\moin --wiki-url=wikiserver.example.com/mywiki maint cleanpage > cleanpage-output.txt
Locate the cleanpage-output.txt file, and edit it (using a real text editor like Notepad++ or similar, not Windows Notepad). We will be doing a lot of find-replaces.
Replace all mv with d:\robocopy\robocopy.exe /MOVE /E
Remove all # trash. The # character throws off Robocopy, and it errors out if not removed (you want to use find-replace for # trash and leave the replace field blank).
Same for delete, remove all # delete
- Same for the single-quote mark, remove all '
Replace all trash with d:\trash
Replace all delete with d:\delete
- Now that the file is sanitized for Windows, save it.
Now, rename the file from cleanpage-output.txt to cleanpage-output.bat. We can now double-click the bat file. Windows will error-out on all the # ok line items, and so effectively skipping them.
Here's a sample snippet before and after:
mv 'D:\moin\projects\main\data\pages\Simulations' trash # trash # ok: 'D:\moin\projects\main\data\pages\SoftwareEngineering' # ok: 'D:\moin\projects\main\data\pages\SoftwareEngineering(2f)Development' mv 'D:\moin\projects\main\data\pages\SoftwareEngineering(2f)BandwidthRecomendations' deleted # deleted mv 'D:\moin\projects\main\data\pages\SoftwareEngineering(2f)BandwidthRecomendations(2f)Background' deleted # deleted
d:\robocopy\robocopy.exe /MOVE /E D:\moin\projects\main\data\pages\Simulations d:\trash # ok: D:\moin\projects\main\data\pages\SoftwareEngineering # ok: D:\moin\projects\main\data\pages\SoftwareEngineering(2f)Development d:\robocopy\robocopy.exe /MOVE /E D:\moin\projects\main\data\pages\SoftwareEngineering(2f)BandwidthRecomendations d:\deleted d:\robocopy\robocopy.exe /MOVE /E D:\moin\projects\main\data\pages\SoftwareEngineering(2f)BandwidthRecomendations(2f)Background d:\deleted
That's it! Spot-check your wiki, and the trash and delete folders and make sure everything is good.
Once you're done, the fun isn't over! Now you get to upgrade to 1.8! See my Upgrading from 1.7 to 1.8 instructions