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

Fallback storage #61

Closed
rblack opened this issue Jul 16, 2015 · 3 comments
Closed

Fallback storage #61

rblack opened this issue Jul 16, 2015 · 3 comments

Comments

@rblack
Copy link

rblack commented Jul 16, 2015

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')
@ZuluPro
Copy link
Contributor

ZuluPro commented Sep 2, 2015

@rblack
I think the idea of make redundancy with storage is bad. It means we'll have to deal with several storages for list, filter or make operations with backups.
@mjs7231 and @benjaoming may correct me.

But use several storages could be useful for implement archives. Examples:

  • Store backups locally, archive them with DropBox
  • Store backups on S3, archive them with Glacier

@Braintelligence
Copy link

Is it possible to store on multiple storage locations regardless of success, though?

@jonathan-s
Copy link
Contributor

Closing this, we can keep the discussion in #235

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

5 participants