This gem allows pull content from mysql db (on the remote server) and load it into your local postgres database. Technically, dump is not using - but result is almost the same.
Copy content of remote mysql db to tmp/db_server_data as .csv files.
$ rake db:pull your_server@123.4.5.6Replace local postgres db content to pulled.
$ rake db:pull:load
# or
$ RAILS_ENV=staging rake db:pull:loadDelete all files from tmp/db_server_data.
$ rake db:pull:cleanPull remote mysql db data and then loads it to local postgres db.
Same as db:pull and db:pull:load
$ rake db:pull:reloadPull remote mysql db data, load it to postgres db and clean junk from /tmp/db_server_data. Same as db:pull, db:pull:load and db:pull:clean.
$ rake db:pull:forceAdd this line to your application's Gemfile:
gem 'mysql_to_pg_dump'And then execute:
$ bundleOr install it yourself as:
$ gem install mysql_to_pg_dump- ssh -i key.pub username@server supporting
The gem is available as open source under the terms of the MIT License.