[openstack-dev] [OpenStack][Cinder][backup]Get total files/objects disk size of backup

int32bit krystism at gmail.com
Fri Jun 30 06:05:13 UTC 2017

Currently the size in backup is src volume size rather than backup
file/object size, it's used to record original volume size that avoid
damaging target in restore operation if the volume has been resized.

But it may be more useful for end user to tell them backup files/objects
size(object count really make no sense for user). It's also useful for
cloud provider to compute their bill.

I think It's not very hard to implement it if we use or extend
`chunkeddriver`.  Firstly we need add `get_backup_size` new interface in
driver API and let's update backup size in `_finalize_backup`. The backend
driver should implement this interface if possible. If the backend driver
is not possible to implement like `CephBackupDriver`, we raise
NotImplementedError. And then we need add a new field(named volume_size) in
backup object as well as db model associated to backup, and store
files/objects size in original size field. At last, we add this new field
volume_size to backup ViewBuilder in API.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170630/cad846b7/attachment.html>

More information about the OpenStack-dev mailing list