pypi / django-dbbackup
django-dbbackup
What changed in django-dbbackup 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
12 breaking4 new APIs and options4 behavior and defaults25 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdjango-dbbackup 545 changes
Breaking changes 12
The setting is now respected; encrypting to an untrusted public key fails unless the key is trusted or DBBACKUP_GPG_ALWAYS_TRUST is True.
PostgreSQL OPTIONS values now take precedence over the same variables configured through ENV, DUMP_ENV or RESTORE_ENV.
RESTORE_ENV is now applied to pg_restore instead of DUMP_ENV; variables previously reaching pg_restore from DUMP_ENV must be put in RESTORE_ENV.
This setting has been removed; using it now raises an exception. Use Django's built-in STORAGES setting instead.
The deprecated setting is removed; use DBBACKUP_ADMINS instead.
DBBACKUP_STORAGE is no longer supported; use Django's STORAGES['dbbackup'] setting instead.
DBBACKUP_STORAGE_OPTIONS is no longer supported; use Django's STORAGES['dbbackup'] setting instead.
Support for Django 3.2 is dropped.
The PostgreSQL password is supplied through an environment variable to prevent leakage in logs and emails.
Support for Python 3.7 and 3.8 is dropped.
The pytz dependency is dropped in favor of Python's standard-library zoneinfo.
The default SQLite connector changes from SqliteConnector to SqliteBackupConnector.
New APIs and options 4
Adds support for custom metadata writing during operations via this setting.
Adds signals for backup, restore, media backup, and media restore operations.
Adds database-agnostic backup and restore using Django's built-in dumpdata and loaddata management commands.
Adds a connector that backs up SQLite3 databases using the .backup command, which is safe with active connections.
Behavior and default changes 4
PostgreSQL connectors forward sslmode, sslrootcert, sslcert, sslkey, passfile and service from Django database OPTIONS to pg_dump, psql and pg_restore, so backups and restores use the ORM's TLS and client certificate configuration.
PostgreSQL connectors PgDumpConnector and PgDumpBinaryConnector now default IF_EXISTS to True.
Errors for missing tools such as pg_dump and mysqldump now provide guidance instead of a generic file-not-found message.
PostgreSQL connectors automatically use --no-password when PASSWORD is set to None.
Fixes and other changes 25
ADMIN_PASSWORD is now passed to the PostGIS activation step.
Connector list and dict options are now copied per connector, preventing --exclude-tables from mutating class defaults and affecting other databases or later connectors.
dbrestore no longer discards configured DROP and PG_OPTIONS values in DBBACKUP_CONNECTORS; --no-drop and --pg-options still take precedence when passed.
Connector settings configured in DBBACKUP_CONNECTORS are now passed when dbrestore instantiates a connector from backup metadata.
PostgreSQL HOST values that are Unix or Windows socket paths are now automatically URI-encoded to meet pg_restore command-line requirements.
The parameter now correctly outputs log messages to the console instead of suppressing all output regardless of verbosity level.
Fixed backup discovery when location is set in storage options.
Fixed compression when using DjangoConnector.
Fixed an issue where paramiko os.stat sizes were larger on the target than on the source.
Metadata files are now removed during clean-up.
The dbbackup metadata file is always written as bytes, supporting storage backends that enforce bytes content.
New backups include an additional metadata file to prevent restoring a backup with a different database connector.
Compressed media backups are restored using gzip.GzipFile instead of tarfile's gzip decompression algorithm.
Parsing of excess whitespace in comma-separated arguments passed with -d is fixed.
The -O flag now routes S3 URIs to the storage backend instead of attempting to write to the local filesystem.
Restore no longer raises io.UnsupportedOperation when a file object does not support fileno().
Encryption support is fixed when using gnupg 5.x.
The -O flag now routes S3 URIs to the storage backend instead of attempting to write to the local filesystem.
Path corruption is fixed for restored files whose paths contain "media".
Using --clean now automatically enables --if-exists to fix PostgreSQL restore errors with identity columns.
Temporary file locking issues during SQLite backups on Windows are fixed.
Restore no longer fails when multi-line TextField content contains semicolons.
SQLite restore no longer encounters no such table errors.
SQLite restore no longer encounters UNIQUE constraint errors.
SQLite restore no longer encounters index, trigger, or view already-exists errors.