Primary Authors
@wesleykendall (Wes Kendall)
@ethanpobrien (Ethan O’Brien)
Dump and restore Postgres databases with Django.
django-pgclone provides commands and utilities for doing Postgres dumps and restores. In contrast with other Django database copy/restore apps like django-db-backup, django-pgclone has the following advantages:
Defaults to streaming restores (when S3 is enabled) for larger databases and limited instance memory.
Provides hooks into the dump and restoration process, allowing users to perform migrations and other user-specified management commands before the restored database is swapped into the main one without interfering with the application.
Allows ls of database dumps and easily restoring the latest dump of a particular database.
Read the docs to get started using the core management commands and to learn about how to configure django-pgclone for your use case.
Install django-pgclone with:
pip3 install django-pgclone
After this, add pgclone to the INSTALLED_APPS setting of your Django project.
django-pgclone depends on django-pgconnection. Although this dependency is automatically installed, one must add pgconnection to settings.INSTALLED_APPS and also configure the settings.DATABASES setting like so:
import pgconnection DATABASES = pgconnection.configure({ 'default': # normal database config goes here... })
For information on setting up django-pgclone for development and contributing changes, view CONTRIBUTING.rst.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ba5f8cb8e77f301c2b370a79207385b0016cd3b5e54c97c21bec87fadce57c |
|
MD5 | 2b1b8ba5890b813280bde457d7b55ef0 |
|
BLAKE2b-256 | 4cebba5715ce3573ab329a21fa4a721f3d7561915b22ce578a3abe1fef4f89f5 |