Skip to main content

Dump and restore Postgres databases with Django.

Project description

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:

  1. Defaults to streaming restores (when S3 is enabled) for larger databases and limited instance memory.

  2. 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.

  3. 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.

Documentation

View the django-pgclone docs here.

Installation

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...
})

Contributing Guide

For information on setting up django-pgclone for development and contributing changes, view CONTRIBUTING.rst.

Primary Authors

  • @wesleykendall (Wes Kendall)

  • @ethanpobrien (Ethan O’Brien)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-pgclone-1.0.1.tar.gz (13.5 kB view hashes)

Uploaded Source

Built Distribution

django_pgclone-1.0.1-py3-none-any.whl (16.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page