Add support to incremental backups in cinder

1. Added a new option to create backup to support incremental backups.
   New CLI option added for "cinder backup": --incremental or --incr
   By default, it is full backup.
   Add the following to API: 'incremental': True or False
   (False is the default)
2. swift.py creates sha256file for every backup to calculate deltas

DocImpact
APIImpact
Co-Authored-By: Xing Yang <xing.yang@emc.com>
Implements: blueprint incremental-backup
Change-Id: I98f3765f7afa47bda6a8c7004f809c3cc4d1bd4b
This commit is contained in:
Xing Yang
2015-01-12 14:16:28 -05:00
parent b3e86455f8
commit e7f592df7b
16 changed files with 976 additions and 44 deletions

View File

@@ -3008,6 +3008,20 @@ def backup_get_all_by_project(context, project_id, filters=None):
return _backup_get_all(context, filters)
@require_context
def backup_get_all_by_volume(context, volume_id, filters=None):
authorize_project_context(context, volume_id)
if not filters:
filters = {}
else:
filters = filters.copy()
filters['volume_id'] = volume_id
return _backup_get_all(context, filters)
@require_context
def backup_create(context, values):
backup = models.Backup()