This conversion was developed as an add-on to Converting Active To DadaIMC to document some of the problems I found along the way.

I would recommend reading both his and this before migration.

In preparation, you will want to have dadaIMC installed on the target box before starting any of this. Make sure you log on to the admin interface of dadaIMC and delete the welcome to dadaIMC message, or else your articles will not link properly (comments will be posted as articles on the newswire, articles will be as comments on other articles, etc. really a pain in the rear).

Shutdown publishing on the active site - you can simply move the publish page to do this. I would also recommend making a feature to alert people to downtime and the coming new codebase.

You are going to need to do a bunch of stuff to the active site to get all the information you need moved to the dada machine. You should do something on the new machine first though - I copied down all the files for the site off of paranode onto the dadaIMC server - they will be used in the migration. This is documented in akb's doc (referenced above) - you will need ncftp in order to do it.

I recommend that you navigate to /www/active-cvs/ and do a (using sudo if you are able)

tar -zcvf /destination/path/for/tar/file CITYNAME/

this tars the all the directories you need except for uploads. Get uploads by going to /www/uploads/

tar -zcvf /destination/path/for/uploads/tar/file CITYNAME/

Then you will have all file structure you need to recreate the active site if you ever decide to.

Now you will need to get a dump of the postgres db for the city you are migrating. Get the password for the city from the db-setup.php3 file in the local dir.

pg_dump active_CITYNAME -u -h inglis > CITYNAME_active_pg_dump.sql

you will want to gzip that also before transferring.

Then if the city uses features, you will need to get a dump of the mysql features db on stallman.

mysqldump -u features -p imc |gzip -c > imc.sql.gz

you will need a pw for this, if you do not know it, ask someone in the know on irc.indy #tech

now get all that stuff over to the new dada server that will be hosting the new site....

(I'll wait)



you are going to want to untar the uploads file first - this will create a dir with the cityname and then under that, metafiles with lots of hard and sym links... what a mess eh? Well, this is what we are moving away from - just keep repeating that to yourself....

rename the cityname to uploads, then untar the active dir structure. go to /cityname/local/webcast and change the uploads symlink from what it is to where you just put the uploads dir you unpacked in the above step.

now go into the metafiles dir within uploads. Move everything into the uploads dir so metafiles is empty. Then remove metafiles. Now copy everything from paranode on top of the uploads dir. I recommend doing a chown www:www if that is what the webserver runs as... Now while still in uploads do a

ln -s . metafiles

(remember this, is a process that has worked for me, it is wacked, but if you come up with something better, then wiki-ify it for society at large)

make sure there are no 0 size txt files - they will kill the migration script. from inside uploads do

ls -l *.txt | grep " 0 "

remove any text files with size of 0.

While you're at it, why not remove all files of 0 size? Boston, at least, had a number of other 0 files that were causing numerous errors. We also had one entry with a null summary, which also caused trouble (though '' is apparently ok).

set up the postgresdb on the new server (this is temporary) and load it with the db info from stallman.

you can do createdb from the shell, then psql -d CITYNAME -f FILENAME.sql - note, if you have trouble, simply remove line 5 of the dumpfile (the one that says \connect DBNAME) and connect as the postgres superuser.

This might be a good time to check for lame records in the webcast table of the postgres db. Boston had ~ 70 rows with missing mime_type values, which caused convert to die.

modify the convert script (can be found on akb's page Converting Active To DadaIMC to fit your site. Make sure your active_root ends with /webcast, or else the script won't do anything.

before running the script, make sure you have gifsicle and jpeginfo installed and in your default path, or else the script won't be able to determine image size.

run the script - I usually modify the script to output a lot of information and do something like (if fails to work for you, drop db active_map, and empty articles and media from the mysql db... then run - attached below)

./ 2>&1 | tee migration_log.txt (tee writes a file migration_log.txt but also shows the output)

then if something goes wrong you can tail it and see what it last choked on.

while that is running, create db imc in mysql and load that with the features db dump. Get the site ID for your site (from imc.IMC_SITE_INFO) and plug it into the script.

Once the article migration is finished - then run the script.

once finishes - you have to choose how to handle old media uploads. akb present's one solution in his conversionhowto - and I have chosen to go a different way, largely because I have dealt mainly with sites that have fewer articles and media uploads than DC.

I put all the media into the appropriate subdirs on dada - jpegs, gifs, bmps, pngs for instance all go into /usermedia/image

then I run a mediafixer.php script (attached below) that spud made in order to sort all of the files into their proper subdirs - then they get re-mirrored to the content server where they should be.

Also, don't forget to download front.php3 from the active migration tarball available at - this'll make old active url's work on your new site once DNS changes over.

-- ChristopherMitchell - 13 Nov 2003
-- BrianSzymanski - 07 Dec 2003 added notes about gifsicle and /webcast
Topic revision: r11 - 12 Dec 2003, BrianSzymanski
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