From: | Kirk Strauser <kirk(at)nmotioninc(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | I wrote a program to migrate Interbase -> PostgreSQL |
Date: | 2001-12-05 15:40:27 |
Message-ID: | 873d2p8yl0.fsf@legion.priv |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Christophe ARNU | 2001-12-05 15:47:14 | |
Previous Message | Jodi Kanter | 2001-12-05 14:53:44 | found alternate solution |
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Whiteley | 2001-12-05 15:55:56 | Table specified more than once error! |
Previous Message | Scott Rose | 2001-12-05 15:08:50 | lost system tables: any hope? |