Exporting a local mysql database to postgres using taps

You can easily export the data from a local mysql database to postgreSQL using the taps gem. This is necessary if you have an old installed version and are upgrading to a newer version.

to get things started

$ sudo gem install taps

now we need to start a taps sever for the mysql database.

If your database is setup with the root user, without a password, on the localhost, do:

$ taps server mysql://root@localhost/scrumninja_production tapsuser tapspassword

otherwise

$ taps server mysql://user:password@host/scrumninja_production tapsuser tapspassword

you should see

== Sinatra/0.9.0.4 has taken the stage on 5000 for production with backup from Thin

Now that the server is running, we need to create a new postgres database.

$ createdb scrumninja_production

and now its time to pull

$ taps pull postgres://postgresuser:postgrespassword@localhost/scrumninja_production http://tapsuser:tapspassword@localhost:5000

now you should see something like
Receiving schema from remote taps server Receiving data from remote taps server<br/> 15 tables, 2000 records<br/> users: 100% |====================| Time: 00:00:00<br/> ...

It should take a while as it goes through every table and pulls all the data.
Congratulations, you've ported to Postgres.