cinder backup recovery api - import/export backups

Registered by Edward Hope-Morley on 2013-10-30

We are almost at the stage where we will have backups that, should your cloud go offline/blow up/fall off a cliff, would allow complete restoration of volumes to their original state including db metadata. What we do not have is a means of restoring the backup metadata so that volume can then be restored with the existing backup/restore api.

Blueprint information

Status:
Complete
Approver:
John Griffith
Priority:
Medium
Drafter:
Edward Hope-Morley
Direction:
Approved
Assignee:
RonenKat
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Thierry Carrez on 2014-01-07
Completed by
John Griffith on 2014-03-04

Related branches

Sprints

Whiteboard

Use cases:
1. Enable recovering from a DB loss
2. "Tape/backup shipping" - deliver a "backup" to a secondary site

Implementation details:

New admin API: backup-import host=<cinder-host-with-backup-enabled> backup-string=<description-string>
Creates a new backup DB entry and populates the entry using the details in the backup-string on the backup host.
<cinder-host-with-backup-enabled> - backup host
<description-string> - description of the backup DB fields or a hint for the backup driver how to fetch them

Backup drivers: can implement import_verify to validate that the backup is intact on the backup storage and that restore operations are possible, return model_update with details of backup.
Default implementation: (if no driver implementation) create backup entry from the description string and return to caller.

New admin API: backup-export backupid=<backup-id>
Return a description string that can be used at a future time for backup-import
<backup-id> must exists

Backup drivers: can implement backup_export to return a driver-specific string. For example, the Swift backup driver may generate a URL that contains the container and backup prefix, where all the information can be found as metadata.
Default implementation: (if no driver implementation) generates a description string from the cinder-backup database fields.

Gerrit topic: https://review.openstack.org/#q,topic:bp/cinder-backup-recover-api,n,z

Addressed by: https://review.openstack.org/69351
    Export and import backup service metadata

Python client code: https://review.openstack.org/#/c/72743

Documentation: https://review.openstack.org/#/c/86754/
    New sections in OpenStack Cloud Administrator Guide

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.