My web stack is django/python + postgresql + linux + apache. I use fabric to automate the deployment from local to the server. For the deployment automation, I wish I could include data migration from my local database to the corresponding database on the server. Is there a way to do that? I prefer to see the data migration becoming a fabric task, if possible.
Share
I think you need to somehow export the data to a file / files, copy to the target server, and import them. The utilities to do this in Django (documentation) are
dumpdataandloaddata.So on the local database:
Then to the server:
You should also have a look at South, which is a database migration tool for Django.