Home/Mediawiki/OAI_mirror/pragmatic_synchronisation        page discussion        wiki discussion edit history     [Images:TURN OFF] [Connection:go offline]

This page explains how to do pragmatic two-way mirroring of two mediawikis.

This isn't a production-ready recipe, but it's a highly experimental proof of concept. While I've documented the steps, I don't really recommend you do this on anything but an experimental mediawiki install. USE AT YOUR OWN RISK!

[edit] 1 Installation

The idea is to install the OAI extension on both wikis, the remote-server, and the local-client. It works like this:

  1. Install OAI extension on remote-server. See Mediawiki/OAI mirror/OAIRepository for instructions.
  2. Install a local mediawiki, and install OAI extension on this local mediawiki ("local-client")
  3. Also install:
    • wikisync perl code: This is perl. It can be anywhere on your system, but must be able to access the checkpoint code, and the oai updater code (in the oai extension). You need a bunch of perl modules for it.
    • checkpoint code: This is just php, and is easy. It goes into the oai extension directory.
  4. Finally run OAI updater on local-client to pull all data into the local-client

[edit] 2 Synchronisation

When you run the wikisync perl code, this happens:

[edit] 3 Issues

An issue that isn't treated well is page moves: changes that may need to be merged are now in different histories. So we need to detect page moves, and make sure that local changes are merged into the new page, before the move is applied locally.

Ideally this would be packages into an extension, that runs synchronisation from an edit hook, depending on whether connectivity is available

This is a crude and horrendous process, and requires all sorts of tweaking. But for a seasoned php programmer, it shouldn't be too hard to tie all of this down properly.

Home/Mediawiki/OAI_mirror/pragmatic_synchronisation, rev=12408, user=Bjoern, time=2009-07-01T22:44:22Z
Page: Mediawiki/OAI_mirror/pragmatic_synchronisation, server-cache-status=cached, images=, connection=, client-cache=no