guettli
guettli

Reputation: 27816

sync db between prod and dev system

I need a tool to sync postgreSQL database between a production system and a local development system.

Data needs to be fetched from the production server to the local development server.

Example: I want to fetch all rows of the model TicketType (about 100 rows), but not all rows of the model Ticket (several thousands).

I know how to use pg_dump and I know how I can use dumpdata in django.

But maybe there is a better solution.

(I don't need a solution to get changes from dev to prod, that's managed with south.)

Upvotes: 1

Views: 2098

Answers (1)

bma
bma

Reputation: 9756

If you are using any recent version of Postgresql, you can use dblink, or if you are using Postgres 9.3, you can use the nifty new postgres_fdw. You could also test out the postgres_fdw extension backported for 9.2 at https://github.com/commandprompt/postgres_fdw

Upvotes: 2

Related Questions