1

I have sqlite database with alot of data. I want to "copy" (migrte) all the data from my sqlite to postgres data base. Any one know about a tool that help with migrate sqlite to postgres? I google it but didnt find something. Thanks alot for helping.

3
  • what did you search? just google: "convert database tool" Commented Apr 20, 2016 at 23:17
  • i tried migrate sqlite to postgres. Commented Apr 20, 2016 at 23:20
  • search convert database tool. it show you many of them. most of db converters support both sqlite and postgres as they are popular these days. good luck! Commented Apr 20, 2016 at 23:23

2 Answers 2

7

What worked for me was to run sequel from ruby. Just run the commands:

gem install sequel

You will need to have installed on your system the devel packages for postgres , sqlite and ruby

Run the command:

gem install pg sqlite3

Create an empty database on postgresql, let's say testDB and assign a grant permission to a user

From the command prompt run:

sequel -C sqlite:///path/to/sqlitedb.db postgres://user:password@host/testDB

This will run with no errors.

Sign up to request clarification or add additional context in comments.

1 Comment

what should the path format be like...isnt it sqlite:///home/username/project/db.sqlite3
1

I recommend using fullcopyconvert, it does the suggested migration.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.