get backup total file/object size

Registered by int32bit on 2017-06-30

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.NotImplementedError.

Blueprint information

Status:
Not started
Approver:
Sean McGinnis
Priority:
Undefined
Drafter:
int32bit
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
Accepted for queens
Implementation:
Unknown
Milestone target:
milestone icon queens-3

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.