godo.VectorDBs.RestoreBackup()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.VectorDBs.RestoreBackup(ctx context.Context, id string, backupID string, restore *godo.VectorDBRestoreBackupRequest) (*godo.VectorDBRestoreBackupResponse, *godo.Response, error)

Description

RestoreBackup initiates a restore from a backup. The restore is performed asynchronously; use GetRestoreStatus to monitor progress.

This method sends a POST request to /v2/vector-databases/{}/backups/{}/restore.

Parameters

id string required
backupID string required
restore *godo.VectorDBRestoreBackupRequest required

Fields of godo.VectorDBRestoreBackupRequest

VectorDBRestoreBackupRequest represents a request to restore a vector database from a backup.

ID string

Omitted from JSON when empty. JSON key: id

BackupID string

Omitted from JSON when empty. JSON key: backup_id

Returns

*godo.VectorDBRestoreBackupResponse
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.VectorDBRestoreBackupResponse

VectorDBRestoreBackupResponse represents the initial response from a restore operation.

BackupID string

Omitted from JSON when empty. JSON key: backup_id

Status string

Omitted from JSON when empty. JSON key: status

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.VectorDBs.RestoreBackup(ctx, "<your-id>", "<your-backup-id>", &godo.VectorDBRestoreBackupRequest{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

More Information

See POST /v2/vector-databases/{}/backups/{}/restore in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.