Use volume_id and timestamp to generate container name
Currently, the container is fixed string, so that the backup will coverage the older one everytime. Use volume_id and timestamp to generate container name, so each time will provide a different container to storage the backup. Change-Id: I58b3e151e6fcd8a37bf45cd545c79208ac968c3b Closes-Bug: #1563207
This commit is contained in:
parent
97a981c2c8
commit
285e292aa2
|
@ -123,5 +123,9 @@ class BackupOs:
|
|||
incremental = True
|
||||
else:
|
||||
incremental = False
|
||||
cinder.backups.create(volume_id, self.container, name, description,
|
||||
|
||||
container = "{0}/{1}/{2}".format(self.container, volume_id,
|
||||
utils.DateTime.now().timestamp)
|
||||
|
||||
cinder.backups.create(volume_id, container, name, description,
|
||||
incremental=incremental, force=True)
|
||||
|
|
Loading…
Reference in New Issue