Skip site navigation (1) Skip section navigation (2)

Re: move from mysql to postgresql

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Gerd König <koenig(at)transporeon(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: move from mysql to postgresql
Date: 2008-11-19 16:25:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Mon, Nov 17, 2008 at 3:35 AM, Gerd König <koenig(at)transporeon(dot)com> wrote:
> Hello,
> we're going to switch from mysql (ver. 5.0.26) to PostgreSQL (OS:
> opensuse 10.3).
> The mysql database includes several instances, and we only want to
> migrate the bugzilla instance to Postgres (yes, it's the bugzilla
> backend...).
> What are the preferred steps to perform this migration ? ("cost free"
> solutions are highly appreciated ;-) ).

The general method is to dump the schema and data separately, then
hand mangle the schema as necessary to make it work in pgsql and then
import the data, with whatever mangling needed there to fix the
inevitably messed up data, like dates of 0000-00-00 which make no
sense whatsoever.

However, since bugzilla supports pgsql directly, I'd imagine you can
use the bugzilla population scripts to create your schema in pgsql and
then you only have to massage the data dump from mysql-bugzilla to
make it work.

If you are familiar with sed, it's awefull useful for fixing up broken
data.  Or you can toss together a script in one of the P or R
languages (Perl, PHP, Python, Ruby et. al.) to fix it up.  Usually
it's pretty easy, but if you get stumped on some part post back with
questions and somebody should jump on it.

In response to

pgsql-admin by date

Next:From: Tino WildenhainDate: 2008-11-19 16:31:22
Subject: Re: [PERFORM] Very Urgent : Sequences Problem
Previous:From: Kranti™ K K ParisaDate: 2008-11-19 15:54:13
Subject: Very Urgent : Sequences Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group