- Changed project ownership to
AmbitionEng
by @wesleykendall in #36.
- Added Python 3.13 support, dropped Python 3.8. Added Postgres17 support by @wesleykendall in #35.
- Django 5.1 compatibility, dropped Django 3.2 / Postgres 12 support by @wesleykendall in #34.
- Fix ReadTheDocs builds. [Wesley Kendall, d5eeaed]
-
Fix issue quoting URLs [Wesley Kendall, ace6561]
Ensure that URLs are percent-encoded when running psql commands.
-
Django 5.0 compatibility [Wesley Kendall, cd279dd]
Support and test against Django 5 with psycopg2 and psycopg3.
- Added Opus10 branding to docs [Wesley Kendall, ba4621f]
-
Add Python3.12 support and use Mkdocs for documentation [Wesley Kendall, 97e7d99]
Python 3.12 and Postgres 16 are supported now, along with having revamped docs using Mkdocs and the Material theme.
Python 3.7 support was dropped.
-
Added Python 3.11, Django 4.2, and Psycopg 3 support [Wesley Kendall, d1cf98c]
Adds Python 3.11, Django 4.2, and Psycopg 3 support along with tests for multiple Postgres versions. Drops support for Django 2.2.
-
Changed behavior of reversible restores and local copies [Wes Kendall, de428c1]
Using the
--reversible
option forpgclone restore
is now only applicable to database dumps and no longer has any effect when executed against a local database. The aliases used by reversible restores have also changed fromprevious
andcurrent
topre
andpost
.In other words, if one uses
--reversible
during apgclone restore
of a database dump, one can revert back to the version of data pre-restore usingpgclone restore :pre
or the version of the data immediately after the restore usingpgclone restore :post
.Unlike before, running
pgclone restore :pre
orpgclone restore :post
has no effect on the copies created when restoring a dump using--reversible
. The:pre
and:post
aliases are only changed when a new reversible dump is restored.This same behavior applies to local copies too.
pclone copy
now requires a target name in the format of a local dump key (:db_name
), and the special:pre
and:post
aliases cannot be used. Users can dopgclone copy :my_backup
andpgclone restore :my_backup
without affecting the special snapshots related to the last restore from a dump.
-
Support overriding Postgres statement timeouts [Wes Kendall, 4ef38f4]
Use
settings.PGCLONE_STATEMENT_TIMEOUT
to override Postgres'sstatement_timeout
setting when running corepgclone
SQL operations such asCREATE DATABASE
.You can also use
settings.PGCLONE_LOCK_TIMEOUT
to override Postgres'slock_timeout
setting.
-
Add
pgclone copy
command. [Wes Kendall, 6ad17b9]The
pgclone copy
command is a shortcut for runningCREATE DATABASE <target> TEMPLATE <source>
for doing quick copies. This command complements localpgclone restore
commands.For example, copy the current database with
pgclone copy
, and quickly restore it withpgclone restore :current
. Use a custom name withpgclone copy :custom_name
and restore it withpgclone restore :custom_name
.Note that this command takes out an exclusive lock on the source database, meaning it should not be executed in production environments.
-
Add
settings.PGCLONE_ALLOW_DUMP
setting. [Wes Kendall, 82c90f4]Set this setting to
False
to prevent the ability to runpgclone dump
.
- Add ability to specify endpoint url [Jack Linke, 2e1e5f5]
-
Quote database connection strings [Wesley Kendall, 31fd3cf]
Database connection strings are properly quoted to avoid issues when there are special characters.
- Updated developer utilities with the latest Django library template [Wesley Kendall, 2508920]
- Implemented a more robust routing method for pre-swap hooks [Wes Kendall, 8f34c40]
- Local development enhancements [Wes Kendall, 5d62570]
- Test against Django 4.1 and other CI improvements [Wes Kendall, c11c848]
- Don't close original connection during routing [Wes Kendall, 93e5c03]
-
Fix issue routing connections during restore [Wes Kendall, 2ab5552]
An issue was fixed that prevented routing hooks during restores from functioning properly.
-
Restore command properly overrides storage location [Wes Kendall, 15acd90]
The restore command now properly passes through custom storage locations from the command line.
-
Allow "reversible" to proliferate through settings and configs. [Wes Kendall, bda7b69]
The
pgclone restore
command was settingreversible
toFalse
, negating settings or configs that overrode it. This has been fixed.
- Update with latest Django template [Wes Kendall, c46d7e4]
- Fix ReadTheDocs builds [Wes Kendall, 7c74338]
-
Upgrade configuration hierarchy, add multi-db support, and change dump key format [Wes Kendall, 5edeeb8]
django-pgclone
hassettings.PGCLONE_CONFIGS
to support re-usable command options. Dump keys were changed to capture the config and also contain a configurable database instance to better distinguish different databases.Multi-database setups are fully supported.
Docs were revamped and overview all settings and configuration possibilities.
Instructions for migrating to version 2 are in the "Frequently Asked Questions" section of the docs.
-
Removed dependency on
django-pgconnection
[Wes Kendall, 5047031]The routing functionality of
django-pgconnection
was replaced by Django's built-in execution hooks.Users no longer have to wrap
settings.DATABASES
withdjango-pgconnection
.
- Updated with latest Django template [Wes Kendall, 5ab9ddd]
- Fix release note rendering and don't package tests [Wes Kendall, 5621de7]
- Updated with latest Django template, fixing doc builds [Wes Kendall, 32a5eea]
- Updated to latest Django template [Wes Kendall, cf4deaf]
- Fixed minor documentation typos [Wes Kendall, 68cb863]
-
Initial release of django-pgclone [Wes Kendall, b8419ce]
django-pgclone
provides management commands for dumping and restoring Postgres databases. Users can configure local or S3 storage backends, and users may also configure hooks and other processes that happen during the dump/restore process.