Migrating from RT 2.0.11/PostgreSQL to RT 2.0.11/MySQL?

I have been running an RT server on a machine with PostgreSQL for a few
months, and now I want to migrate all the ticket information to another
installation, which runs MySQL. In PostgreSQL, the output of “pg_dump
” appears to be the sequence of SQL commands that would be
necessary to reconstruct the database. If I just dump the PostgreSQL RT
database, and then use whatever MySQL’s “execute all the SQL in this
file” is to rebuild the database on the new server, will I have a
problem? Do I have to massage the dump file in some way to make it
conform to MySQL syntax or to match some configuration detail in the
other system?

The new installation has no tickets, queues, or users on it that I care
about preserving. Both are running RT 2.0.11.

“Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.”
–Martin Fowler
// seth gordon // wi/mit ctr for genome research //
// seth@genome.wi.mit.edu // standard disclaimer //

problem? Do I have to massage the dump file in some way to make it
conform to MySQL syntax or to match some configuration detail in the
other system?

General advice would be to not attempt to import the complete dump in one
sitting. If the dump is indeed solely SQL commands, containing no
psql-specific items, go for it.

Unfortunately, neither MySQL nor PostgreSQL appear to have specific
documentation regarding migrating PostgreSQL to MySQL. Documentation for
the other way around exists in plenty.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

“BC” == Bruce Campbell bruce_campbell@ripe.net writes:

BC> On Wed, 13 Mar 2002, Seth Gordon wrote:

problem? Do I have to massage the dump file in some way to make it
conform to MySQL syntax or to match some configuration detail in the
other system?

BC> General advice would be to not attempt to import the complete dump in one
BC> sitting. If the dump is indeed solely SQL commands, containing no
BC> psql-specific items, go for it.

I think if you use the mysql schema file from the source tree and then
import the data you should be ok. Just make sure sequence numbers are
set to work properly after the import.

Usually, it makes more sense to add the indexes after the data, but
that depends on your data set size.

Hi Seth,

Have you been able to resolve this? I have the same intention now, but
am unsure if it will work OK.

Else, how did you migrate your Pg db to MySQL?

Rehan van der Merwe
NHA-----Original Message-----
From: Seth Gordon [mailto:seth@genome.wi.mit.edu]
Sent: 13 March 2002 07:26
To: rt-users@lists.fsck.com
Subject: [rt-users] migrating from RT 2.0.11/PostgreSQL to RT
2.0.11/MySQL?

I have been running an RT server on a machine with PostgreSQL for a few
months, and now I want to migrate all the ticket information to another
installation, which runs MySQL. In PostgreSQL, the output of “pg_dump
” appears to be the sequence of SQL commands that would be
necessary to reconstruct the database. If I just dump the PostgreSQL RT
database, and then use whatever MySQL’s “execute all the SQL in this
file” is to rebuild the database on the new server, will I have a
problem? Do I have to massage the dump file in some way to make it
conform to MySQL syntax or to match some configuration detail in the
other system?

The new installation has no tickets, queues, or users on it that I care
about preserving. Both are running RT 2.0.11.