Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Python/Django): How do I keep my production db in sync (scheme and data) and with dev pc db?

I have a local Postgres database which will be filled with data (daily) on my local development machine. What is a good solution to transfer/sync/mirror this data to a production Postgres database.

For what it's worth I'm developing in Python using Django.

Thanks!


1 Answers

This seems like a strange workflow for me. Wouldn't it be much better to import the data in the production database and then just sync it with your development db from time to time? IMO, the development machine shouldn't be included in the production data workflow.

That's the way I do it using fabric. I've written a simple function which copies part of the production db onto the local development machine.

like image 113
Haes Avatar answered Dec 23 '25 02:12

Haes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!