Child pages
  • Migrating MoinMoin wiki to Confluence
Skip to end of metadata
Go to start of metadata

Work in progress

This page is work in progress

Some references

Basic steps

Preparation

  • Put the moin pages (a copy from the filesystem of the moinmoin server) into a directory, for instance "moin-pages". Remove .svn folders out of it (leftovers of svn checkout(s)).
  • You might want to do a "cleanup" pass through the list of pages. Remove pages that you don't want to convert, and look into pages that don't actually contain content / no revisions.
  • Put a directory "user" as a sibling to "moin-pages", with the user files (taken from the moinmoin server) of all users applicable to your pages.
  • In the user files, change the "name" key to "origname", and add another "name=<confluence user id>" field, for all users that already have a confluence account. Try to convince as many users as possible to create a Confluence account, and put their name=confluence_id in their user file. This helps attribute correct authorship to their converted pages in Confluence.
  • In confluenceSettings.properties, set trustall to "true" (or find another way to have the tool trust the SSL certificate of the confluence server).
  • In exporter.moinmoin.properties:
    • src=<directory with the moin pages>
    • out=<directory where the exporter will put exported pages, for instance "moin-pages-out" next to "moin-pages">
    • history=true
  • I have done a lot of changes to the standard converter.moinmoin.properties. See the file I used here in attachment: converter.moinmoin.properties

Export

  • Start the UWC with run_uwc.sh or run_uwc.bat.
  • Select type=moinmoin
  • Click Export
  • Keep an eye out for any exceptions in the output
  • If you want, verify the exported pages in "moin-pages-out". Because of the "history=true" setting, there should be files for every revision of every pages.

Convert

  • Perform test conversions to a test wiki space first
  • In the UWC GUI, fill in remaining fields:
    • Attachments: your "moin-pages" directory
    • Pages: start with a single page (multiple revisions, or just a single version) from the moin-pages-out directory, to test.
    • Address: https://cwiki.apache.org/confluence
    • Login: ...
    • Password: ...
    • Space Key: ...
  • The user account that performs the conversion / upload should have Confluence Admin privileges. Otherwise you wont be able to set the author and date fields of your historic revisions (and you'll get lots of exceptions about this).
  • On the "Other Tools" tab, you can click "Test Connection" to verify the connection.
  • On the main tab, click "Convert".
  • Keep an eye out for any exceptions in the output
  • Because our converter.moinmoin.properties file contains the setting MoinMoin.0001.engine-saves-to-disk.property=true, the converted files are saved into a directory output/output below your UWC working directory, before they are uploaded to Confluence. This can be very useful to determine the cause of an exception, to figure out where some regex replacement went wrong or something like that (by visually inspecting the converted file, together with the exception details).

Troubleshooting

  • If you get StackOverflowError during regex Pattern matching, try adding  -Xss16m or higher to the java command in run_uwc.sh (increasing the stack size).
  • You can experiment with the regex replacement patterns in converter.moinmoin.properties (remember to inspect the intermediate saved files in output\output). The order, determined by the numbers after MoinMoin in that file, is important. I.e. the Converters are executed in that order. The java-regex-tokenizer converter is special: it converts the matching pattern by a unique token (so it gets hidden from further converters), which is replaced back at the end by the DetokenizerConverter. This is useful if you want your replacement result to be exempt from further converters after your java-regex-tokenizer.
  • No labels