# 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](https://django-pgclone.readthedocs.io/) 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.9 - 3.13, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 17.
## 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](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
## Contributing Guide
For information on setting up `django-pgclone` for development and contributing changes, view [CONTRIBUTING.md](CONTRIBUTING.md).
## Primary Authors
- @wesleykendall (Wes Kendall)
- @ethanpobrien (Ethan O'Brien)
Raw data
{
"_id": null,
"home_page": "https://github.com/AmbitionEng/django-pgclone",
"name": "django-pgclone",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9.0",
"maintainer_email": null,
"keywords": null,
"author": "Wes Kendall",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/07/3a/51ac176df1279c22ef7fcdf3ca93eeb2e34e38d0ab6fc23905322371b704/django_pgclone-3.7.1.tar.gz",
"platform": null,
"description": "# django-pgclone\n\n`django-pgclone` makes it easy to dump and restore Postgres databases.\nHere are some key features:\n\n1. Streaming dumps and restores to configurable storage backends like S3. Instances with limited memory aren't a problem for large databases.\n2. A restoration process that works behind the scenes, swapping in the restored database when finished.\n3. Configurable hooks into the dump and restore process, for example, migrating a restored database before it is swapped.\n4. Reversible restores, making it possible to quickly revert to the initial restore or the previous database.\n5. Re-usable configurations for instrumenting different types of dumps and restores.\n\n## Quickstart\n\nTo dump a database, do:\n\n python manage.py pgclone dump\n\nTo list database dump keys, do:\n\n python manage.py pgclone ls\n\nTo restore a datase, do:\n\n python manage.py pgclone restore <dump_key>\n\nDatabase 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`.\n\nWhen listing, use an optional prefix. Restoring supports the same interface, using the latest key that matches the prefix.\n\n## Documentation\n\n[View the django-pgclone docs here](https://django-pgclone.readthedocs.io/) to learn more about:\n\n* The basics and an overview of how it works.\n* The core command docs.\n* Configuring an S3 storage backend.\n* Running management command hooks during dumping or restoring.\n* Creating restores that can be quickly reverted.\n* Re-using command parameters for different flows.\n* All settings.\n* Additional details on using AWS RDS databases.\n\n## Compatibility\n\n`django-pgclone` is compatible with Python 3.9 - 3.13, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 17.\n\n## Installation\n\nInstall `django-pgclone` with:\n\n pip3 install django-pgclone\n\nAfter this, add `pgclone` to the `INSTALLED_APPS` setting of your Django project.\n\n**Note** Install the AWS CLI to enable the S3 storage backend. Use `pip install awscli` or follow the [installation guide here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).\n\n## Contributing Guide\n\nFor information on setting up `django-pgclone` for development and contributing changes, view [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Primary Authors\n\n- @wesleykendall (Wes Kendall)\n- @ethanpobrien (Ethan O'Brien)\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Dump and restore Postgres databases with Django.",
"version": "3.7.1",
"project_urls": {
"Documentation": "https://django-pgclone.readthedocs.io",
"Homepage": "https://github.com/AmbitionEng/django-pgclone",
"Repository": "https://github.com/AmbitionEng/django-pgclone"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "763bc7224c8f2d11784c720ba03d93df28b3a5acd0ec63c8761e85b84f79a374",
"md5": "7600ca456c64628d2c418b5b1a931b60",
"sha256": "0e8c5dd09b1e1629fc04a4cd4321799b4728422cd1b088432191849125bded9d"
},
"downloads": -1,
"filename": "django_pgclone-3.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7600ca456c64628d2c418b5b1a931b60",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9.0",
"size": 21630,
"upload_time": "2025-09-02T16:20:34",
"upload_time_iso_8601": "2025-09-02T16:20:34.609105Z",
"url": "https://files.pythonhosted.org/packages/76/3b/c7224c8f2d11784c720ba03d93df28b3a5acd0ec63c8761e85b84f79a374/django_pgclone-3.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "073a51ac176df1279c22ef7fcdf3ca93eeb2e34e38d0ab6fc23905322371b704",
"md5": "80926199196895a7d61db6aa0b9ec086",
"sha256": "74e66f6ddac09aade74e050b3808d2c5cb9144ca369ed380be2ba9f2e239c125"
},
"downloads": -1,
"filename": "django_pgclone-3.7.1.tar.gz",
"has_sig": false,
"md5_digest": "80926199196895a7d61db6aa0b9ec086",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9.0",
"size": 17936,
"upload_time": "2025-09-02T16:20:35",
"upload_time_iso_8601": "2025-09-02T16:20:35.667112Z",
"url": "https://files.pythonhosted.org/packages/07/3a/51ac176df1279c22ef7fcdf3ca93eeb2e34e38d0ab6fc23905322371b704/django_pgclone-3.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-02 16:20:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AmbitionEng",
"github_project": "django-pgclone",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"circle": true,
"tox": true,
"lcname": "django-pgclone"
}