Project

General

Profile

Actions

Converting database from sqlite to postgres

It may not be the best way but it worked for me. I used taps gem for conversion.

First add taps gem to your foreman Gemfile

gem 'taps'

and run bundle install.

Then start taps server which will make your current sqlite accessible

taps server sqlite:///path/to/foreman/db/development.sqlite3 user pass

Make sure you have existing postgres DB, username and password ready. With this command you'll start copying data from sqlite to postgres.

taps pull postgres://username:password@localhost/foreman http://user:pass@localhost:5000

It will take few minutes (based on amount of data). You'll see the progress during the process.

Updated by Marek Hulán over 10 years ago · 1 revisions