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.
-
what did you search? just google: "convert database tool"FLICKER– FLICKER2016-04-20 23:17:34 +00:00Commented Apr 20, 2016 at 23:17
-
i tried migrate sqlite to postgres.zasUser– zasUser2016-04-20 23:20:43 +00:00Commented 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!FLICKER– FLICKER2016-04-20 23:23:24 +00:00Commented Apr 20, 2016 at 23:23
Add a comment
|
2 Answers
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.
1 Comment
Amanur Rahman
what should the path format be like...isnt it sqlite:///home/username/project/db.sqlite3