Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're working on a website, and when we develop locally (one of us from Windows), we use sqlite3, but on the server (linux) we use postgres. We'd like to be able to import the production database into our development process, so I'm wondering if there is a way to convert from a postgres database dump to something sqlite3 can understand (just feeding it the postgres's dumped SQL gave many, many errors). Thanks.

share|improve this question
It sounds like you're also going to have to go back the other way, so you'd save yourself a lot of effort by installing and developing against postgres interally. – SmallClanger May 27 '11 at 8:07
The same question on StackOverflow. – Zaz May 11 '15 at 20:26

I think that is better work on the same type of the database in the development stage, however you have some way for convert postgreSQL database to a SQLLite Database :

1) if you want to migrate only table data you could export in CSV format table on PostgreSQL and then import it on SQLlite database : On PostgreSQL : COPY sometable to '/tmp/sometable.csv' delimiters',' CSV HEADER;

On SQLite :

sqlite> .mode csv
sqlite> .import /tmp/sometable.csv sometable

2)Migrate Structure and data quick way : use a database migrator tool like :

With this two tool you can easily migrate your database schema and data from PostgreSQL to SQLite .

Note : there's also other database migrator tool, but this two is the two that i consider the best tool for doing this job.

share|improve this answer

Why not just install postgresql locally? Its much better to have local system as close to production as possible, to be sure all your queries works well, all indexes are best etc.

share|improve this answer

With the application VSceneGIS (GPL) can export tables from Postgres including geometric types to SQLite.

share|improve this answer
I don't think this is a fit here, he's talking about regular database dumping. The product you linked has almost no English translations whatsoever, so it's a bit hard to intrepid.. – pauska Dec 19 '11 at 18:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.