-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
"--clean" flag not working as expected #479
Comments
The possible cause of this issue could be the If that is the case,
|
The In order to specify output path, that must be done when using the See the docs for more details. |
Unfortunately, the |
But, I was able to achieve something almost equal to the expected solution using DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
DBBACKUP_DEFAULT_SERVER_NAME = env("DBBACKUP_DEFAULT_SERVER_NAME", default="localhost")
def backup_filename(databasename, servername, datetime, extension, content_type):
return f"{servername}-{datetime}.{extension}"
DBBACKUP_FILENAME_TEMPLATE = backup_filename
DBBACKUP_CLEANUP_KEEP = 2
DBBACKUP_PREFIX = "test-prefix"
DBBACKUP_STORAGE_OPTIONS = {'location': 'abs/or/relative/path/to/backups'} |
This might be good to document. Would you like to PR a note to this effect? |
It seems to be the information is already in the docs. Technically, the |
Yep, you're right. The existing documentation is solid. |
apart from that, I think it is better to add a |
Yup. How about a PR that adds a system check for this? |
Describe the bug
The
--clean
flag gracefully ignoring theDBBACKUP_CLEANUP_KEEP
valueTo Reproduce
Expected behavior
The
test-prefix/default/
directory should only contain files equal to the value ofDBBACKUP_CLEANUP_KEEP
Versions
Django-dbbackup
External tools
The text was updated successfully, but these errors were encountered: