'Restore the given volume backup from TSM server.
:param backup: backup information for volume
:param volume_id: volume id
:param volume_file: file object representing the volume
:raises: InvalidBackup'

def restore(self, backup, volume_id, volume_file):

    (backup_path, backup_mode) = _get_backup_metadata(backup, 'restore')
    LOG.debug('Starting    restore    of    backup    from    TSM    to    volume    %(volume_id)s,    backup:    %(backup_id)s,    mode:    %(mode)s.', {'volume_id': volume_id, 'backup_id': backup.id, 'mode': backup_mode})
    (volume_path, unused) = _get_volume_realpath(volume_file, volume_id)
    restore_path = _create_unique_device_link(backup.id, volume_path, volume_id, backup_mode)
    try:
        self._do_restore(backup_path, restore_path, volume_id, backup_mode)
    except processutils.ProcessExecutionError as exc:
        err = (_('restore:    %(vol_id)s    failed    to    run    dsmc    on    %(bpath)s.\nstdout:    %(out)s\n    stderr:    %(err)s') % {'vol_id': volume_id, 'bpath': restore_path, 'out': exc.stdout, 'err': exc.stderr})
        LOG.error(err)
        raise exception.InvalidBackup(reason=err)
    except exception.Error as exc:
        err = (_('restore:    %(vol_id)s    failed    to    run    dsmc    due    to    invalid    arguments    on    %(bpath)s.\nstdout:    %(out)s\n    stderr:    %(err)s') % {'vol_id': volume_id, 'bpath': restore_path, 'out': exc.stdout, 'err': exc.stderr})
        LOG.error(err)
        raise exception.InvalidBackup(reason=err)
    finally:
        _cleanup_device_hardlink(restore_path, volume_path, volume_id)
    LOG.debug('Restore    %(backup_id)s    to    %(volume_id)s    finished.', {'backup_id': backup.id, 'volume_id': volume_id})
