Linux – How to migrate data from a Firebird database to PostGreSQL on Linux

firebirdlinuxmigrationpostgresql

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?

Best Answer

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.