Skip to content

Releases: Archmonger/django-dbbackup

5.3.0

10 Apr 01:44
a51a707

Choose a tag to compare

Fixed

  • Fix compression when using DjangoConnector.
  • Fix an issue with paramiko os.stat sizes were larger on the target compared to the source.
  • Fix issue with dbrestore not finding backups when location is set in storage options.

5.2.0

11 Feb 04:42
2bed725

Choose a tag to compare

Added

  • Added support for custom metadata writing and validation during operations via DBBACKUP_BACKUP_METADATA_SETTER and DBBACKUP_RESTORE_METADATA_VALIDATOR settings.

5.1.2

15 Jan 00:32
89cda19

Choose a tag to compare

Fixed

  • Fixed a bug where metadata files were not being removed during clean-up.

5.1.1

08 Jan 05:27
536ae14

Choose a tag to compare

Fixed

  • Ensure dbbackup metadata file is always written as bytes to support storage backends that enforce bytes content (e.g. Google Cloud Storage).

5.1.0

17 Dec 13:17
5ecc2ca

Choose a tag to compare

Fixed

  • Prevent restoring a backup from a different database connector (e.g. Postgres backup to SQLite) by adding an additional metadata file to all new backups.
  • Fixed compressed media backup restoration by using gzip.GzipFile instead of tarfile's gzip decompression algorithm.

5.0.1

07 Nov 11:00
0ed283d

Choose a tag to compare

Security

  • To prevent accidental media exports, this package will now generate an exception if utilizing the legacy DBBACKUP_STORAGE or DBBACKUP_STORAGE_OPTIONS settings. These settings have been removed in favor of using Django's built-in STORAGES setting. Please refer to the documentation for more information on how to migrate your configuration.

5.0.0

30 Aug 08:13
73a21e5

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

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

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

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