cinder/cinder/backup
Gorka Eguileor 640b9dc2b7 NFS Backup: Fix overwritting backups
When using the NFS backup driver if we do multiple backups using the
same container we end up overwriting older backups.

The issue comes from a misunderstanding in the Posix backup driver of
the purpose of the "prefix" metadata used in the ChunkedBackupDriver
base class.

This prefix is for the name of the backup objects to store, but unlike
the prefix for the volumes, here it must be unique as the base driver
will only add numbers to identify the chunk (for the volume we add the
volume id).  Unfortunately the Posix driver just assumed that the prefix
had the same meaning as the prefix for volumes thus making one backups
override one another.

This patch changes the prefix generated by the Posix driver so we have
the following format: "volume_$VOL_ID_$TIMESTAMP_backup_$BACK_ID", thus
allowing multiple backups in the same container.

The new name is backward compatible with existing backups because the
new prefix will only be used on new backups as the prefix for already
existing backups is stored in the DB.

Change-Id: I2903c27633facde6370d95ba0b9e06025ccaef26
Closes-Bug: #1628768
(cherry picked from commit 535e717970)
2017-05-23 16:34:39 +02:00
..
drivers NFS Backup: Fix overwritting backups 2017-05-23 16:34:39 +02:00
__init__.py Move oslo.utils to oslo_utils namespace 2015-01-19 21:50:34 -06:00
api.py Merge "Use method is_valid_boolstr from oslo_utils" 2016-12-16 04:59:38 +00:00
chunkeddriver.py Remove unused context parameter 2016-08-08 10:47:40 +05:30
driver.py Replace key manager with Castellan 2016-08-29 10:19:10 +08:00
manager.py Make BackupManager not a SchedulerDependentManager 2017-01-18 15:36:29 +01:00
rpcapi.py Refactor backup RPC API test cases 2017-01-23 11:14:10 +01:00