'Export a backup.'

def export_record(self, req, id):

    LOG.debug('Export    record    for    backup    %s.', id)
    context = req.environ['cinder.context']
    try:
        backup_info = self.backup_api.export_record(context, id)
    except exception.InvalidBackup as error:
        raise exc.HTTPBadRequest(explanation=error.msg)
    retval = self._view_builder.export_summary(req, dict(backup_info))
    LOG.debug('Exported    record    output:    %s.', retval)
    return retval
