Skip to main content

django-pgclone

django-pgclone makes it easy to dump and restore Postgres databases. Here are some key features:

  1. Streaming dumps and restores to configurable storage backends like S3. Instances with limited memory aren't a problem for large databases.
  2. A restoration process that works behind the scenes, swapping in the restored database when finished.
  3. Configurable hooks into the dump and restore process, for example, migrating a restored database before it is swapped.
  4. Reversible restores, making it possible to quickly revert to the initial restore or the previous database.
  5. Re-usable configurations for instrumenting different types of dumps and restores.

Quickstart

To dump a database, do:

python manage.py pgclone dump

To list database dump keys, do:

python manage.py pgclone ls

To restore a datase, do:

python manage.py pgclone restore <dump_key>

Database dumps are relative to the storage location, which defaults to the local file system. Dump keys are in the format of <instance>/<database>/<config>/<timestamp>.dump.

When listing, use an optional prefix. Restoring supports the same interface, using the latest key that matches the prefix.

Documentation

View the django-pgclone docs here to learn more about:

  • The basics and an overview of how it works.
  • The core command docs.
  • Configuring an S3 storage backend.
  • Running management command hooks during dumping or restoring.
  • Creating restores that can be quickly reverted.
  • Re-using command parameters for different flows.
  • All settings.
  • Additional details on using AWS RDS databases.

Compatibility

django-pgclone is compatible with Python 3.10 - 3.14, Django 4.2 - 6.0, Psycopg 2 - 3, and Postgres 14 - 18.

Installation

Install django-pgclone with:

pip3 install django-pgclone

After this, add pgclone to the INSTALLED_APPS setting of your Django project.

Note Install the AWS CLI to enable the S3 storage backend. Use pip install awscli or follow the installation guide here.

Contributing Guide

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

Primary Authors

  • @wesleykendall (Wes Kendall)
  • @ethanpobrien (Ethan O'Brien)

Metadata

Release files for django-pgclone 3.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-pgclone 3.8.0
File Size Uploaded
django_pgclone-3.8.0.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-pgclone 3.8.0
File Interpreter ABI Platform
django_pgclone-3.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.9 kB

Release files / django_pgclone-3.8.0.tar.gz

Download URL django_pgclone-3.8.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f8e67bc8d2dc00cb1b6a5aa83bd2be85f5fc2d9124c807526f34f64bfcd56fcd
BLAKE2b-256 checksum
How to use checksums
17b54e80d1153bf746d4ea7db16c8059ddf3a4507dd1d1d3bfe7cccc6a0ba1d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.14.0 Linux/6.8.0-1040-aws

Release files / django_pgclone-3.8.0-py3-none-any.whl

Download URL django_pgclone-3.8.0-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57a2ff119493f38708c54e64ef22a616f29408f4dff84b933e62e6cabecc5f65
BLAKE2b-256 checksum
How to use checksums
d422af97557122390dbce217040315cdb48d9d99114704815328f92e3e12387c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.14.0 Linux/6.8.0-1040-aws

Release history Release notifications | RSS feed

This release

3.8.0 This release

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page