Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

List backups for an index

List all backups for an index.

Python
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

index_backups = pc.list_backups(index_name="docs-example")

print(index_backups)
JavaScript
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })

const indexBackups = await pc.listBackups({ indexName: 'docs-example' });

console.log(indexBackups);
Java
import io.pinecone.clients.Pinecone;
import org.openapitools.db_control.client.ApiException;
import org.openapitools.db_control.client.model.*;

public class CreateBackup {
    public static void main(String[] args) throws ApiException {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();

        String indexName = "docs-example";
        BackupList indexBackupList = pc.listIndexBackups(indexName);

        System.out.println(indexBackupList);
    }
}
Go
package main

import (
	"context"
	"encoding/json"
	"fmt"
	"log"

	"github.com/pinecone-io/go-pinecone/v4/pinecone"
)

func prettifyStruct(obj interface{}) string {
	bytes, _ := json.MarshalIndent(obj, "", "  ")
	return string(bytes)
}

func main() {
	ctx := context.Background()

	pc, err := pinecone.NewClient(pinecone.NewClientParams{
		ApiKey: "YOUR_API_KEY",
	})
	if err != nil {
		log.Fatalf("Failed to create Client: %v", err)
	}

	indexName := "docs-example"
	limit := 2
	indexBackups, err := pc.ListBackups(ctx, &pinecone.ListBackupsParams{
		Limit: &limit,
		IndexName: &indexName,
	})
	if err != nil {
		log.Fatalf("Failed to list backups: %v", err)
	}
	fmt.Printf(prettifyStruct(indexBackups))
}
C#
using Pinecone;

var pinecone = new PineconeClient("YOUR_API_KEY");

var indexBackups = await pinecone.Backups.ListByIndexAsync( "docs-example", new ListBackupsByIndexRequest());

Console.WriteLine(indexBackups);
curl
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_NAME="docs-example"

curl -X GET "https://api.pinecone.io/indexes/$INDEX_NAME/backups" \
     -H "Api-Key: $PINECONE_API_KEY" \
     -H "X-Pinecone-Api-Version: 2025-04" \
     -H "accept: application/json"
Python
[{
    "backup_id": "8c85e612-ed1c-4f97-9f8c-8194e07bcf71",
    "source_index_name": "docs-example",
    "source_index_id": "f73b36c9-faf5-4a2c-b1d6-4013d8b1cc74",
    "status": "Ready",
    "cloud": "aws",
    "region": "us-east-1",
    "tags": {},
    "name": "example-backup",
    "description": "Monthly backup of production index",
    "dimension": 1024,
    "record_count": 98,
    "namespace_count": 3,
    "size_bytes": 1069169,
    "created_at": "2025-05-15T00:52:10.809305882Z"
}]
JavaScript
{
  "data": [
    {
      "backupId": "8c85e612-ed1c-4f97-9f8c-8194e07bcf71",
      "sourceIndexName": "docs-example",
      "sourceIndexId": "f73b36c9-faf5-4a2c-b1d6-4013d8b1cc74",
      "name": "example-backup",
      "description": "Monthly backup of production index",
      "status": "Ready",
      "cloud": "aws",
      "region": "us-east-1",
      "dimension": 1024,
      "metric": undefined,
      "recordCount": 98,
      "namespaceCount": 3,
      "sizeBytes": 1069169,
      "tags": {},
      "createdAt": "2025-05-15T00:52:10.809305882Z"
    }
  ],
  "pagination": undefined
}
Java
class BackupList {
    data: [class BackupModel {
        backupId: 8c85e612-ed1c-4f97-9f8c-8194e07bcf71
        sourceIndexName: docs-example
        sourceIndexId: f73b36c9-faf5-4a2c-b1d6-4013d8b1cc74
        name: example-backup
        description: Monthly backup of production index
        status: Initializing
        cloud: aws
        region: us-east-1
        dimension: null
        metric: null
        recordCount: null
        namespaceCount: null
        sizeBytes: null
        tags: {}
        createdAt: 2025-05-16T19:46:26.248428Z
        additionalProperties: null
    }]
    pagination: null
    additionalProperties: null
}
Go
{
  "data": [
    {
      "backup_id": "bf2cda5d-b233-4a0a-aae9-b592780ad3ff",
      "cloud": "aws",
      "created_at": "2025-05-16T18:01:51.531129Z",
      "description": "Monthly backup of production index",
      "dimension": 0,
      "name": "example-backup",
      "namespace_count": 1,
      "record_count": 96,
      "region": "us-east-1",
      "size_bytes": 86393,
      "source_index_id": "bcb5b3c9-903e-4cb6-8b37-a6072aeb874f",
      "source_index_name": "docs-example",
      "status": "Ready",
      "tags": {}
    },
    {
      "backup_id": "e12269b0-a29b-4af0-9729-c7771dec03e3",
      "cloud": "aws",
      "created_at": "2025-05-14T17:00:45.803146Z",
      "dimension": 0,
      "name": "example-backup2",
      "namespace_count": 1,
      "record_count": 96,
      "region": "us-east-1",
      "size_bytes": 86393,
      "source_index_id": "bcb5b3c9-903e-4cb6-8b37-a6072aeb874f",
      "source_index_name": "docs-example",
      "status": "Ready"
    }
  ],
  "pagination": {
    "next": "eyJsaW1pdCI6Miwib2Zmc2V0IjoyfQ=="
  }
}
C#
{
  "data":
  [
    {
      "backup_id":"9947520e-d5a1-4418-a78d-9f464c9969da",
      "source_index_id":"8433941a-dae7-43b5-ac2c-d3dab4a56b2b",
      "source_index_name":"docs-example",
      "tags":{},
      "name":"example-backup",
      "description":"Monthly backup of production index",
      "status":"Pending",
      "cloud":"aws",
      "region":"us-east-1",
      "dimension":1024,
      "record_count":98,
      "namespace_count":3,
      "size_bytes":1069169,
      "created_at":"2025-03-11T18:29:50.549505Z"
    }
  ]
}
curl
{
  "data":
  [
    {
      "backup_id":"9947520e-d5a1-4418-a78d-9f464c9969da",
      "source_index_id":"8433941a-dae7-43b5-ac2c-d3dab4a56b2b",
      "source_index_name":"docs-example",
      "tags":{},
      "name":"example-backup",
      "description":"Monthly backup of production index",
      "status":"Pending",
      "cloud":"aws",
      "region":"us-east-1",
      "dimension":1024,
      "record_count":98,
      "namespace_count":3,
      "size_bytes":1069169,
      "created_at":"2025-03-11T18:29:50.549505Z"
      }
    ],
  "pagination":null
}

GET /indexes/{index_name}/backups

  • index_name (path, string, required) — Name of the backed up index
  • limit (query, integer) — The number of results to return per page.
  • paginationToken (query, string) — The token to use to retrieve the next page of results.
  • 200 — This operation returns a list of all the backups that you have previously created, and which are associated with the given index.
  • 401 — Unauthorized. Possible causes: Invalid API key.
  • 404 — Index not found.
  • 500 — Internal server error.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu