Back to UkActiveToMir Back to UkMovingToMir Back to ImcUkTech Back to ImcUk

For more detail on various elements, refer to the "Long" install document located here:

Here some instructions on how to migrate an imc from Stallman/Active to a new MIR server. This builds on an initial text by SdLotus but is still incomplete. In the examples of the commands and paths below I use some words between square brackets that are different for different imc's and should be changed: "[yourimc]" is the login and imc name on Stallman/Active, and "[yourimclogin]" relates to the login and possibly your imc name on the MIR server.

Download and install MIR on a server

A good method to use is to create a mir user, and then create your site specific dir in /home/mir. So, for example, I use


and in that directory, check out the mir code. That will make is easier to add other mir installs in the future. Instructions for doing so are here:

You'll also need to install postgresql, tomcat 4, ant, JAI and apache. Better instructions for installing that software is here (but see below for Debian-specific details):

Debian specific things

Mir 1.1 has some prerequisites:

  1. postgres 7.1+
  2. tomcat 3 or > 4.0.3
  3. apache 1.3.x with
  4. ant 1.4+
  5. jaxp, part of ant
  6. jai (java advanced imaging)

fortunately, when one uses Debian "woody" the debian packages can take care of most of these:

  • apt-get install postgres gives you postgres 7.2
  • apt-get install tomcat4 for tomcat
  • apt-get install apache
  • apt-get install libapache-mod-jk
  • apt-get install ant

You'll also need a JDK; add the following line to your /etc/apt.sources.list file

deb woody main non-free

then do
  • apt-get update
  • apt-get install j2sdk1.3

you'll be prompted to say "yes" to the license agreements frown, sad smile

Tomcat items

you'll need to set and export the following environment variables:




export JAVA_HOME

you'll need to install the JAI; wget works: wget "" and get four files:
  • jai_codec.jar
  • jai_core.jar
  • mlibwrapper_jai.jar

and these go into the $TOMCAT_HOME/common/lib directory

edit the following file /etc/default/tomcat4 as such:




employ the following steps:

su - postgres
psql template1
psql> alter user postgres with password 'some-postgres-password';
psql> \q

edit the /etc/postgresql/pg_hba.conf file:

local   all                           password
host    all   password


/etc/init.d/postgresql restart

Then Mir can be checked out from cvs

cd to the directory you want to place the Mir code, then do the following two steps:


cvs -d login

Note: the cvs has been moved to codecoop. use this now:

cvs -d login



cvs -d co -r MIR_1_1 mir

as above, use this instead:

cvs -d co -r MIR_1_1 mir

you'll need to create the database for your site - if this is a new installation, there is a script in mir/dbscripts: db_name postgres_superuser mir_db_username mir_db_users_password

at this point you edit the mir/etc/ file to match your site's needs; cd to the mir directory, and run


-- StefaniB - 11 Nov 2003

Make database dumps on Stallman/Active

You need to know the passwords for your imc's features and newswire databases. If you don't know them, ask on the #tech irc channel.

On Stallman/Active you'll be logged in with the generic logon of [yourimc]. I assume you're in your home directory. To dump both your features and newswire use the following commands:

   mysqldump -v -u root -p imc | gzip -f -9 > features.sql.gz
      enter password when prompted

   pg_dump -v -u -d -h inglis -p 6543 --no-owner active_[yourimc] | gzip -f -9 > active.sql.gz
      enter dbuser [yourimc] when prompted
      enter password when prompted

added note by sb: one can use --opt switch with mysqldump e.g

      mysqldump -v -u root -p --opt imc | gzip -f -9 > features.sql.gz
         enter password when prompted

--opt turns on -quick, --add-drop-table, --add-locks, --extended-insert and --lock-tables This should give fastest possible dump of database and locks the table while dump takes place.

mysqldump gives portable ASCII format unlike mysqlhotcopy which should not be used.

Note, if you are using postgres earlier than 7.3, such as is the case with Stallman, you need to include the option --inserts with your pg_dump.

Push the dumps to your MIR server

Now scp your features and newswire dumps over from Stallman/Active to your new server. Assuming you have created a directory "dumps" in your home directory on the MIR server, and your server's address being "", you would use these commands:

   scp features.sql.gz [yourimclogin][yourimclogin]/dump/features.sql.gz
      enter password when prompted

   scp active.sql.gz [yourimclogin][yourimclogin]/dump/active.sql.gz
      enter password when prompted

Then gunzip the dumps on your MIR server. They should now both be in


Copy uploaded files from stallman (active)

Files uploaded to Stallman/Active are filed in just one directory per imc, in


In here are the doc, htm, html, pdf, mov, wav and zip files. In the same directory there is as well another important directory where the other formats live:


In here are the gif, jp(e)g, png, mp(e)g, mp3, mov, ra, rm and wav files.

You will encounter a few weird files in possibly both directories that have nearly identical names like

   -rw-------    1 apache   apache          0 May  2  2002 01inbOOaUga
   -rw-r--r--    1 root     root           36 Mar 15  2003

The file '' is a placeholder that contains the path to the real file on Paranode ( - in this case that would be the url ; for more details on the workings of this check .

You will not be able to import a placeholder like '' with the MIR conversion scripts - you will have to get the original file from Paranode in order to import it into MIR.

On your MIR server dump the files into two directories - you need one for text and htm(l) files, and another for the other media. For the example commands to work below let's say these directories are


Active to Mir Migration Tools

There are a series of scripts that you can use to migrate from Active to Mir. They can be found here:

For instructions on how to access cvs and download these scripts and download them, see

Let's say you have all these files in this directory:


The file

First of all rename to ; then you'll need to edit it to settings that are appropriate for your server. Below are only the examples of the database, the database dumps, and the text and media dump locations listed as they're described in this text - but you'll need to change a few more settings. If you get stuck ask about them on in #mir.

For the database itself change lines 7 and 8 ("# connection details for the new database:") to


For the database dump change lines 11 and 12 ("# locations for the dump files:") to


For the text and media dumps change lines 35 and 36 ("# locations of the externally stored active data:") to


Importing your active IMC into your MIR server

Let's say you have created your database already with user [yourimclogin] and password [password].

Move into the directory where you put the conversion scripts (in our example /home/[yourimclogin]/active2mirscripts).

The best thing to start with is probably to look at and manually do the steps in that script one at a time. If you do the steps one at a time you can stop and catch any errors.

Once you've made sure that most errors are caught you could run the automagic script as a whole:

   export PGUSER=[yourimclogin]
   export PGPASSWORD=[password]
   ./ > logfile

Check the logfile for any missing media or text files at


Carefully document any error you get and email them to or ask about them on in #mir.

Caveats, Gotchas, Etc

You'll want to setup port forwarding so that your publish link correctly goes to the tomcat4 port.

You'll have to add a rewrite rule or redirect php script so that your old php links get rewritten into their new mir format.

Old stories show up in the admin console under their own category, as old stuff. You'll have to edit the templates in /etc/producer/templates to include those types.

At SD, when importing our old data we somehow ended up with ascii instead of unicode tables, watch out for that as its a pain in the ass to fix later.

Topic pages are not generated automatically because they take so long to generate. You'll have to add a cron job for them.

Good luck! Happy media making to you!

Used the initial text by SdLotus that was on UkActiveToMir and extended -- AndiE - 07 and 08 Nov 2003

Added a few brief sentences and links about how to install mir. Replaced the gaping hole with a totally inadequate crumb. -- SdLotus - 09 Nov 2003

updated cvs source - was mir.indy, now is codecoop -- StefaniB - 24 Feb 2005
Topic revision: r11 - 25 Dec 2005, WietsE
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback