Skip to content

The DBBACKUP_DATABASES configuration is ignored #497

Open
@pifantastic

Description

@pifantastic

Bug Report

Please help us help you by filling out any applicable information in this template and removing the rest!

Describe the bug

The DBBACKUP_DATABASES configuration is ignored. This is due to a bug in this line of code: https://github.com/jazzband/django-dbbackup/blob/790ec8bd297ef24cddfd2618d18d243abd15437e/dbbackup/management/commands/dbbackup.py#L83

If a -d option is not given, this code will always evaluate to [''], with the result that default is the database chosen.

To Reproduce

  • Configure DBBACKUP_DATABASES to use a non default database`
  • python manage.py dbbackup
  • Note that the database that is backed up is defaul, not the database specified by DBBACKUP_DATABASES

Expected behavior

The dbbackup command should backup the databases configure in DBBACKUP_DATABASES

Screenshots or reproduction

If applicable, add screenshots (errors, example of the behavior, etc.) to help explain your problem or post a link to a repository that replicates the issue.

Versions

Django-dbbackup

  • pypi: 4.0.2

External tools

  • Python: 3.11.6
  • Django: 4.1.13
  • OS: MacOS

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions