presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/backup/HttpBackupStore.java/HttpBackupStore/restoreShard
class HttpBackupStore:    @Override
    public void restoreShard(UUID uuid, File target)
    {
        Request request = prepareGet()
                .addHeader(PRESTO_ENVIRONMENT, environment)
                .setUri(shardUri(uuid))
                .build();

        try {
            StatusResponse status = httpClient.execute(request, new FileResponseHandler(target));
            if (isNotFound(status) || isGone(status)) {
                throw new PrestoException(RAPTOR_BACKUP_ERROR, "Backup shard not found: " + uuid);
            }
            if (!isOk(status)) {
                throw badResponse(status);
            }
        }
        catch (IOException | RuntimeException e) {
            throw new PrestoException(RAPTOR_BACKUP_ERROR, "Failed to restore shard: " + uuid, e);
        }
    }