Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any good tools to migrate existing firebird databases to PostgreSQL for Linux systems?

I've looked at: FBexport which can be used to dump the data as insert statements, but it's mainly written to export/import from one firebird db to another, not as a migration tool.

There's also: Firebird to PostgreSQL Win32 tool, but it's only for win32 systems.

Is there any good tool to do this? Or should I just roll my own?

share|improve this question
up vote 2 down vote accepted

When I needed to move some complicated data from a MySQL database to a PostgreSQL database, I wrote a perl script that connected to the MySQL database, selected the data, did whatever conversions were needed (like tinyint(1) to boolean and autoincrement to sequence, etc) and inserted it into the PostgreSQL database. For simpler conversions, I did a mysql_dump to a file of insert statements as your FBexport will do, then fixed up what needed to be fixed with a sed script. It's not automated and perfect, but it was fast and good enough.

share|improve this answer
The "export-INSERTS-to-text-and-sed/awk-everthing" is pretty much a universal method to move data when your back is against the wall. With a bit of judicious script editing, it Just Works(tm). +1 for straightforward answer with a well-known solution. – Avery Payne May 10 '09 at 16:51

Check this out:

I've never used it so I can't say whether it's good or not.

share|improve this answer
Thanks, but unfortunetly, this is a commercial windows app, and I'm looking for a Linux tool, preferably open source. – Tom Feiner May 15 '09 at 19:36

From the reponses I got here, I understand there are no specific migration tool for Firebird -> PostgreSQL on Linux.

I guess I'll have to write this myself.

The major issue here is optimizing the performance of such a migration.

I did find a great resource in chapter 14 of the the postgreSQL documentation, which explains what are the best ways to insert large amounts of data to postgreSQL, like:

  • Disabling auto commits.
  • Using COPY instead of a series of INSERT statements.
  • Removing indexes (or more importantly, only create them at the end of the data inserts).
  • Various memory configuration tunings.
share|improve this answer

You can use FullConverter, but i don't think any comercial tool will do the trick with one click. you'll need to check the constraints, indexes and auto-increments.

you could also try to write your own bash/perl/python/whatever script to do the job.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.