Thread: I wrote a program to migrate Interbase -> PostgreSQL

I wrote a program to migrate Interbase -> PostgreSQL

From
Kirk Strauser
Date:
I wrote a Perl program to help my company migrate from Interbase to
PostgreSQL by extracting a database's data and metadata and dumping it as a
set of SQL commands (similar to pg_dump or mysqldump).

I wrote the program originally to do a row-level backup of our Interbase
databases.  We had a few that were corrupted, and the standard tools were
unable to extract data from them without segfaulting, so I came up with this
to scavenge as much information as possible from the failing databases.
Recently, I convinced my company to dump Interbase in favor of PostgreSQL
(yay!), but we host about 20 websites, each with databases in the hundreds
of thousands of rows, and we weren't looking forward to the data transfer at
all.  I happened to remember this program, made a few modifications, and
came up with something that Works Good Enough For Now.

My boss was gracious to let me release this under the terms of the GPL
(thanks, Don!), so feel free to mangle it to your heart's content.

Please, please, PLEASE note that this was never written to be the end-all
be-all of database conversion utilities.  It's simply the solution to a
problem that we had, and written with the needs of my company in mind.  I
hope that someone else can use it, but it may turn out to be worthless for
anyone but us.

It supports:

  - Full exporting of all data and metadata in a database.

  - A rudimentary mechanism for re-writing datatype names (a simple one-way
    Perl hash).

  - Support for converting Interbase auto-incremement triggers to PostgreSQL
    SERIAL fields, including setting the current value at the end of the
    process.

If you're interested, it can be found at:

  http://www.honeypot.net/~kirk/dbreplicate.gz

Let me know if you like it, hate it, or find it remotely useful!
--
Kirk Strauser
Internet Software Engineer
NMotion, Inc.

Re: I wrote a program to migrate Interbase -> PostgreSQL

From
Kirk Strauser
Date:
At 2001-12-05T15:40:27Z, Kirk Strauser <kirk@nmotioninc.com> writes:

> If you're interested, it can be found at:
>
>   http://www.honeypot.net/~kirk/dbreplicate.gz

Actually, I just made a little web page for the program.  It's at:

   http://www.honeypot.net/~kirk/projects/dbreplicate.html

The old link will continue to work, at least for now, but the new address
will be canonical.
--
Kirk Strauser
Internet Software Engineer
NMotion, Inc.

Re: I wrote a program to migrate Interbase -> PostgreSQL

From
Bruce Momjian
Date:
>
> At 2001-12-05T15:40:27Z, Kirk Strauser <kirk@nmotioninc.com> writes:
>
> > If you're interested, it can be found at:
> >
> >   http://www.honeypot.net/~kirk/dbreplicate.gz
>
> Actually, I just made a little web page for the program.  It's at:
>
>    http://www.honeypot.net/~kirk/projects/dbreplicate.html
>
> The old link will continue to work, at least for now, but the new address
> will be canonical.

This now appears on our techdocs page:

    http://techdocs.postgresql.org/

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026