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: dcc563d10811190825v5c139131u8f41f6ea6db776ae@mail.gmail.com (view raw or flat)
Thread:
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-2014 The PostgreSQL Global Development Group