Skip to content

Fallback storage #61

@rblack

Description

@rblack

This is not a bug actually, but a suggestion to make dbbackup more "backupier" :)
In case of failing saving backup to storage, backup file will be lost. For example, dropbox api sometimes gives 500 error and no files will be saved. To prevent this fallback storage could be used and settings changed to something similar to Django's database setttings:

DBBACKUP_STORAGES = {
    'default': {
        'MODULE': 'dbbackup.storage.dropbox_storage',
        'TOKENS_FILEPATH': '<local_tokens_filepath>',
        'APP_KEY': '<dropbox_app_key>',
        'APP_SECRET': '<dropbox_app_secret>',
    },
    'fallback': {
        'MODULE': 'dbbackup.storage.s3_storage',
        'BUCKET': '<amazon_bucket_name>',
        'ACCESS_KEY': '<amazon_access_key>',
        'SECRET_KEY': '<amazon_secret_key>',
    }
}

May be also add optional arg to manage.py command to restore either from default or fallback storage:
python manage.py dbrestore fallback

As a simpler alternative use more than one storage to backup to both everytime.

DBBACKUP_STORAGES = ('dbbackup.storage.dropbox_storage', 'dbbackup.storage.s3_storage')

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions