'Make the RPC call to create a volume backup.'

def create(self, context, name, description, volume_id, container, incremental=False, availability_zone=None, force=False, snapshot_id=None, metadata=None):

    check_policy(context, 'create')
    utils.check_metadata_properties(metadata)
    volume = self.volume_api.get(context, volume_id)
    snapshot = None
    if snapshot_id:
        snapshot = self.volume_api.get_snapshot(context, snapshot_id)
        if (volume_id != snapshot.volume_id):
            msg = (_('Volume    %(vol1)s    does    not    match    with    snapshot.volume_id    %(vol2)s.') % {'vol1': volume_id, 'vol2': snapshot.volume_id})
            raise exception.InvalidVolume(reason=msg)
        if (snapshot['status'] not in ['available']):
            msg = (_('Snapshot    to    be    backed    up    must    be    available,    but    the    current    status    is    "%s".') % snapshot['status'])
            raise exception.InvalidSnapshot(reason=msg)
    elif (volume['status'] not in ['available', 'in-use']):
        msg = (_('Volume    to    be    backed    up    must    be    available    or    in-use,    but    the    current    status    is    "%s".') % volume['status'])
        raise exception.InvalidVolume(reason=msg)
    elif ((volume['status'] in ['in-use']) and (not force)):
        msg = _('Backing    up    an    in-use    volume    must    use    the    force    flag.')
        raise exception.InvalidVolume(reason=msg)
    previous_status = volume['status']
    volume_host = volume_utils.extract_host(volume.host, 'host')
    host = self._get_available_backup_service_host(volume_host, volume.availability_zone)
    try:
        reserve_opts = {'backups': 1, 'backup_gigabytes': volume['size']}
        reservations = QUOTAS.reserve(context, **reserve_opts)
    except exception.OverQuota as e:
        quota_utils.process_reserve_over_quota(context, e, resource='backups', size=volume.size)
    latest_backup = None
    if incremental:
        backups = objects.BackupList.get_all_by_volume(context.elevated(), volume_id)
        if backups.objects:
            latest_backup = max(backups.objects, key=(lambda x: (x['data_timestamp'] if ((not snapshot) or (snapshot and (x['data_timestamp'] < snapshot['created_at']))) else datetime(1, 1, 1, 1, 1, 1, tzinfo=timezone('UTC')))))
        else:
            msg = _('No    backups    available    to    do    an    incremental    backup.')
            raise exception.InvalidBackup(reason=msg)
    parent_id = None
    if latest_backup:
        parent_id = latest_backup.id
        if (latest_backup['status'] != fields.BackupStatus.AVAILABLE):
            msg = _('The    parent    backup    must    be    available    for    incremental    backup.')
            raise exception.InvalidBackup(reason=msg)
    data_timestamp = None
    if snapshot_id:
        snapshot = objects.Snapshot.get_by_id(context, snapshot_id)
        data_timestamp = snapshot.created_at
        self.db.snapshot_update(context, snapshot_id, {'status': fields.SnapshotStatus.BACKING_UP})
    else:
        self.db.volume_update(context, volume_id, {'status': 'backing-up', 'previous_status': previous_status})
    backup = None
    try:
        kwargs = {'user_id': context.user_id, 'project_id': context.project_id, 'display_name': name, 'display_description': description, 'volume_id': volume_id, 'status': fields.BackupStatus.CREATING, 'container': container, 'parent_id': parent_id, 'size': volume['size'], 'host': host, 'snapshot_id': snapshot_id, 'data_timestamp': data_timestamp, 'metadata': (metadata or {})}
        backup = objects.Backup(context=context, **kwargs)
        backup.create()
        if (not snapshot_id):
            backup.data_timestamp = backup.created_at
            backup.save()
        QUOTAS.commit(context, reservations)
    except Exception:
        with excutils.save_and_reraise_exception():
            try:
                if (backup and ('id' in backup)):
                    backup.destroy()
            finally:
                QUOTAS.rollback(context, reservations)
    self.backup_rpcapi.create_backup(context, backup)
    return backup
