Skip to content

Releases: Archmonger/django-dbbackup

5.0.0

30 Aug 08:13
73a21e5
Compare
Choose a tag to compare

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, and post_media_restore.
  • New DjangoConnector that provides database-agnostic backup and restore functionality using Django's built-in dumpdata and loaddata 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 to SqliteBackupConnector to adhere to best practices.
  • Set default IF_EXISTS to True for PostgreSQL connectors (PgDumpConnector and PgDumpBinaryConnector) to reduce restore errors when objects are absent.
  • If PASSWORD is set to None 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 library zoneinfo (following Django 4.0+ timezone implementation).
  • Drop support for DBBACKUP_STORAGE AND DBBACKUP_STORAGE_OPTIONS settings, use Django's STORAGES['dbbackup'] setting instead.
  • Remove deprecated DBBACKUP_FAILURE_RECIPIENTS setting, use DBBACKUP_ADMINS instead.
  • Remove deprecated code for legacy Django version compatibility.

Fixed

  • Fixed -O flag to properly handle S3 URIs. Now python manage.py dbbackup -O s3://bucket/path/ and python 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 caused io.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 in PgDumpBinaryConnector.

Security

  • Use environment variable for PostgreSQL password to prevent password leakage in logs/emails.

4.3.0

09 May 19:11
d77d25f
Compare
Choose a tag to compare
  • 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

23 Aug 22:20
d8f09bd
Compare
Choose a tag to compare
  • 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

22 Aug 23:34
85c216f
Compare
Choose a tag to compare
  • 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

15 Jan 00:53
6083171
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 4.0.2...4.1.0

4.0.2

27 Sep 23:25
af443c5
Compare
Choose a tag to compare

What's Changed

4.0.1

10 May 08:50
8364037
Compare
Choose a tag to compare

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

Full Changelog: 4.0.0b0...4.0.0rc1

4.0.0b0

19 Dec 19:45
c8df2cd
Compare
Choose a tag to compare
4.0.0b0 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 3.3.0...4.0.0b0