Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listbackup does not list backups with custome names #491

Open
JeanMarie-PM opened this issue Sep 27, 2023 · 1 comment
Open

listbackup does not list backups with custome names #491

JeanMarie-PM opened this issue Sep 27, 2023 · 1 comment

Comments

@JeanMarie-PM
Copy link

Bug Report

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

Describe the bug

listbackup shows backups created without a -o option, but does not show ones created with this option
media restore with a -i p[tion works as expected.

To Reproduce

./manage.py mediabackup -o mymedia.tar INFO Writing file to mymedia.tar

./manage.py listbackups
Name Datetime
53274d44972d-2023-09-26-182031.tar 09/26/23 18:20:31
default-53274d44972d-2023-09-26-181511.psql.bin 09/26/23 18:15:11
default-53274d44972d-2023-09-26-181803.psql.bin 09/26/23 18:18:03

Expected behavior

Expect to see mymedia.tar in the output

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: [e.g. 3.3.0]

External tools

  • Python: [e.g. 3.7]
  • Django: [e.g. 2.2.0]
  • OS: [Linux, MacOS, Windows]
@BasiliskHill
Copy link

BasiliskHill commented Aug 16, 2024

This occurs because of how we process the files in the backup directory. At the moment, only files that are marked with the same date format provided in the DBBACKUP_DATE_FORMAT setting. It should technically be possible to add a setting or a command option to show the other files, but the date time field wouldn't be populated, making the management command a shortcut to list the documents in your backup directory.

The other option would logically be to apply the time format to the file name in some other way through the backup command, though we would need to make sure it's very deliberately applied and communicated with the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants