Releases: Archmonger/django-dbbackup
Releases · Archmonger/django-dbbackup
5.0.0
Added
- Implement new
SqliteBackupConnector
to backup SQLite3 databases using the.backup
command (safe to execute on databases with active connections). - Verified full Windows compatibility via new CI workflows.
- Add Django Signals support for backup and restore operations. New signals include
pre_backup
,post_backup
,pre_restore
,post_restore
,pre_media_backup
,post_media_backup
,pre_media_restore
, andpost_media_restore
. - New
DjangoConnector
that provides database-agnostic backup and restore functionality using Django's built-indumpdata
andloaddata
management commands.
Changed
- This repository has been transferred out of Jazzband due to logistical concerns.
- Improve error message for missing database tools (
pg_dump
,mysqldump
, etc.) to provide guidance instead of generic "No such file or directory" errors. - Changed default SQLite connector from
SqliteConnector
toSqliteBackupConnector
to adhere to best practices. - Set default
IF_EXISTS
toTrue
for PostgreSQL connectors (PgDumpConnector
andPgDumpBinaryConnector
) to reduce restore errors when objects are absent. - If
PASSWORD
is set toNone
for PostgreSQL connectors, the--no-password
flag is now automatically used.
Removed
- Drop support for end-of-life Python 3.7 and 3.8.
- Drop support for end-of-life Django 3.2.
- Drop
pytz
dependency in favor of Python's standard libraryzoneinfo
(following Django 4.0+ timezone implementation). - Drop support for
DBBACKUP_STORAGE
ANDDBBACKUP_STORAGE_OPTIONS
settings, use Django'sSTORAGES['dbbackup']
setting instead. - Remove deprecated
DBBACKUP_FAILURE_RECIPIENTS
setting, useDBBACKUP_ADMINS
instead. - Remove deprecated code for legacy Django version compatibility.
Fixed
- Fixed
-O
flag to properly handle S3 URIs. Nowpython manage.py dbbackup -O s3://bucket/path/
andpython manage.py mediabackup -O s3://bucket/path/
correctly route S3 URIs to the storage backend instead of attempting to write to local filesystem. - Fix issues with parsing excess whitespace within
dbbackup -d "<COMMA_SEPARATED_ARGS>"
- Fix encryption support when using
gnupg==5.x
. - Resolve SQLite backup temporary file locking issues on Windows.
- Fix MediaRestore path corruption for files containing "media" in their paths.
- Fix FTP storage restore issue where file objects without
fileno()
support causedio.UnsupportedOperation
error during database restore operations. - Fix SQLite restore failing when multi-line
TextField
content contains semicolons. - Fix SQLite
no such table
errors. - Fix SQLite
UNIQUE constraint
errors. - Fix SQLite
index
/trigger
/view
<NAME> already exists
errors. - Fix PostgreSQL restore errors with identity columns by automatically enabling
--if-exists
when using--clean
inPgDumpBinaryConnector
.
Security
- Use environment variable for PostgreSQL password to prevent password leakage in logs/emails.
4.3.0
- Add generic
--pg-options
to pass custom options to postgres. - Add option
--if-exists
for pg_dump command - Empty string as HOST for postgres unix domain socket connection is now supported.
- Support Python 3.13 and Django 5.2
4.2.1
- Add --no-drop option to dbrestore command to prevent dropping tables before restoring data.
- Fix bug where sqlite dbrestore would fail if field data contains the line break character.
4.2.0
- Default HOST to localhost for postgres databases.
- Add PostgreSQL Schema support
- Fix restore of database from S3 storage by reintroducing inputfile.seek(0) to utils.uncompress_file
- Add warning for filenames with slashes in them
- Fix bug where dbbackup management command would not respect settings.py:DBBACKUP_DATABASES
- Remove usage of deprecated 'get_storage_class' function in newer Django versions
- Add support for new STORAGES (Django 4.2+) setting under the 'dbbackup' alias
4.1.0
What's Changed
- Fix restore fail after editing filename by @stan-levend in #465
- Drop python 3.6 by @Archmonger in #472
- update links by @Arhell in #471
- Update doc for backup directory consistency by @jej in #473
- RESTORE_PREFIX for RESTORE_SUFFIX by @mativs in #469
- Support Django 4.1, 4.2 and Python 3.11 by @johnthagen in #485
- Support Python 3.12 and Django 5.0 by @johnthagen in #499
- v4.1.0 by @johnthagen in #500
New Contributors
- @stan-levend made their first contribution in #465
- @Arhell made their first contribution in #471
- @jej made their first contribution in #473
- @mativs made their first contribution in #469
Full Changelog: 4.0.2...4.1.0
4.0.2
What's Changed
- support for prometheus wrapped dbs by @tsundokum in #455
- Backup of SQLite fail if there are Virtual Tables (e.g. FTS tables). by @xbello in #458
- Closes #460: python-gnupg version increase breaks unencrypt_file func… by @chambersh1129 in #461
- v4.0.2 by @Archmonger in #462
4.0.1
What's Changed
- As of this version, dbbackup is now within Jazzband! This version tests our Jazzband release CI, and adds miscellaneous refactoring/cleanup.
- Fix GitHub Actions configuration by @johnthagen in #419
- Enable functional tests in CI by @johnthagen in #420
- Update settings.py comment by @aaronvarghese in #427
- Jazzband transfer tasks by @Archmonger in #418
- Refactoring and tooling by @Archmonger in #438
New Contributors
- @aaronvarghese made their first contribution in #427
- @Archmonger made their first contribution in #418
Full Changelog: 4.0.0b0...4.0.0rc1
4.0.0b0
What's Changed
- Docs: Fix removed host option, explain new options by @bittner in #333
- dbbackup.db.postgres typo fix by @LeeHanYeong in #341
- Replace ugettext_lazy with gettext_lazy by @sumanthratna in #342
- Fix broken link by @jonathan-s in #349
- Remove base_url in docs as it's not used by @jonathan-s in #348
- Update commands.rst to add missing command by @sumit4613 in #337
- Add changelog by @jonathan-s in #351
- Add documentation for django-storage by @jonathan-s in #352
- Fix headings for changelog by @jonathan-s in #354
- Changed logging settings from settings.py to late init by @asaf-kali in #332
- Drop django 1.11 and python 2.7 by @jonathan-s in #353
- Fix authentication error when postgres is password protected by @jonathan-s in #361
- using exclude-table-data instead by @jonathan-s in #363
- Add some issue templates by @jonathan-s in #366
- Replace travis with github actions by @jonathan-s in #368
- 'six' package dependency removed by @jerinpetergeorge in #371
- Add support for exclude tables data in the command interface by @KessoumML in #375
- Make the binary connector the default by @jonathan-s in #339
- Env password is no longer used since #361 by @jonathan-s in #362
- auth source added in mongodb. authentication issue fixed with mongodb… by @Ajaysainisd in #379
- Add support for Python 3.9-3.10 and Django 3.2 by @johnthagen in #401
- Update CHANGELOG by @sumanthratna in #376
- Clean up README by @johnthagen in #407
- Add support for Django 4.0 by @johnthagen in #408
- Update changelog for PRs merged since 3.3.0 release by @johnthagen in #410
- Include long description in package metadata by @johnthagen in #411
- Add build environment by @johnthagen in #412
- Fix RemovedInDjango41Warning related to default_app_config by @johnthagen in #413
- Release 4.0.0b0 by @johnthagen in #414
New Contributors
- @bittner made their first contribution in #333
- @LeeHanYeong made their first contribution in #341
- @sumanthratna made their first contribution in #342
- @jonathan-s made their first contribution in #349
- @sumit4613 made their first contribution in #337
- @asaf-kali made their first contribution in #332
- @jerinpetergeorge made their first contribution in #371
- @KessoumML made their first contribution in #375
- @Ajaysainisd made their first contribution in #379
- @johnthagen made their first contribution in #401
Full Changelog: 3.3.0...4.0.0b0