# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
backup = pc.backups.create(
index_name="docs-example",
name="example-backup",
description="Monthly backup of production index",
)
print(backup)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const backup = await pc.backups.create('docs-example', {
name: 'example-backup',
description: 'Monthly backup of production index',
});
console.log(backup);
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
backupName := "example-backup"
backupDesc := "Monthly backup of production index"
backup, err := pc.CreateBackup(ctx, &pinecone.CreateBackupParams{
IndexName: "docs-example",
Name: &backupName,
Description: &backupDesc,
})
if err != nil {
log.Fatalf("Failed to create backup: %v", err)
}
out, err := json.MarshalIndent(backup, "", " ")
if err != nil {
log.Fatalf("Failed to marshal response: %v", err)
}
fmt.Println(string(out))
}
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_NAME="docs-example"
curl "https://api.pinecone.io/indexes/$INDEX_NAME/backups" \
-H "Api-Key: $PINECONE_API_KEY" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "example-backup",
"description": "Monthly backup of production index"
}'
{
"backup_id": "670e8400-e29b-41d4-a716-446655440001",
"source_index_name": "my-index",
"source_index_id": "670e8400-e29b-41d4-a716-446655440000",
"status": "Ready",
"cloud": "aws",
"region": "us-east-1",
"source_index_deleted_at": "2024-03-05T12:00:00.000Z",
"name": "backup-2025-02-04",
"description": "Backup before bulk update.",
"schema": {
"fields": {
"body": {
"embed": {
"dimension": 1024,
"metric": "cosine",
"model": "llama-text-embed-v2"
},
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"sparse_embed": {
"model": "pinecone-sparse-english-v0"
},
"store_text": true,
"type": "string"
},
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"store_text": true,
"type": "string"
}
}
},
"record_count": 120000,
"namespace_count": 3,
"size_bytes": 10000000,
"tags": {
"tag0": "val0",
"tag1": "val1"
},
"created_at": "2025-02-04T10:30:00.000Z"
}Create a backup of an index
Create a backup of an index.
The backup records the schema of the index it is taken from and reports it as schema. An index created from the backup with Create index from backup inherits that schema.
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
backup = pc.backups.create(
index_name="docs-example",
name="example-backup",
description="Monthly backup of production index",
)
print(backup)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const backup = await pc.backups.create('docs-example', {
name: 'example-backup',
description: 'Monthly backup of production index',
});
console.log(backup);
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
backupName := "example-backup"
backupDesc := "Monthly backup of production index"
backup, err := pc.CreateBackup(ctx, &pinecone.CreateBackupParams{
IndexName: "docs-example",
Name: &backupName,
Description: &backupDesc,
})
if err != nil {
log.Fatalf("Failed to create backup: %v", err)
}
out, err := json.MarshalIndent(backup, "", " ")
if err != nil {
log.Fatalf("Failed to marshal response: %v", err)
}
fmt.Println(string(out))
}
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_NAME="docs-example"
curl "https://api.pinecone.io/indexes/$INDEX_NAME/backups" \
-H "Api-Key: $PINECONE_API_KEY" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "example-backup",
"description": "Monthly backup of production index"
}'
{
"backup_id": "670e8400-e29b-41d4-a716-446655440001",
"source_index_name": "my-index",
"source_index_id": "670e8400-e29b-41d4-a716-446655440000",
"status": "Ready",
"cloud": "aws",
"region": "us-east-1",
"source_index_deleted_at": "2024-03-05T12:00:00.000Z",
"name": "backup-2025-02-04",
"description": "Backup before bulk update.",
"schema": {
"fields": {
"body": {
"embed": {
"dimension": 1024,
"metric": "cosine",
"model": "llama-text-embed-v2"
},
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"sparse_embed": {
"model": "pinecone-sparse-english-v0"
},
"store_text": true,
"type": "string"
},
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"store_text": true,
"type": "string"
}
}
},
"record_count": 120000,
"namespace_count": 3,
"size_bytes": 10000000,
"tags": {
"tag0": "val0",
"tag1": "val1"
},
"created_at": "2025-02-04T10:30:00.000Z"
}# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
backup = pc.backups.create(
index_name="docs-example",
name="example-backup",
description="Monthly backup of production index",
)
print(backup)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const backup = await pc.backups.create('docs-example', {
name: 'example-backup',
description: 'Monthly backup of production index',
});
console.log(backup);
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
backupName := "example-backup"
backupDesc := "Monthly backup of production index"
backup, err := pc.CreateBackup(ctx, &pinecone.CreateBackupParams{
IndexName: "docs-example",
Name: &backupName,
Description: &backupDesc,
})
if err != nil {
log.Fatalf("Failed to create backup: %v", err)
}
out, err := json.MarshalIndent(backup, "", " ")
if err != nil {
log.Fatalf("Failed to marshal response: %v", err)
}
fmt.Println(string(out))
}
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_NAME="docs-example"
curl "https://api.pinecone.io/indexes/$INDEX_NAME/backups" \
-H "Api-Key: $PINECONE_API_KEY" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "X-Pinecone-Api-Version: 2026-07" \
-d '{
"name": "example-backup",
"description": "Monthly backup of production index"
}'
Authorizations
An API Key is required to call Pinecone APIs. Get yours from the console.
Body
The configuration needed to create a backup of an index.
Response
The backup was created. The returned backup starts in status Initializing; poll it until the status is Ready.
The BackupModel describes the configuration and status of a Pinecone backup.
The schema of a Pinecone index. The schema defines the typed fields that documents in the index can contain, including vector fields, string fields searched by full-text search or by embeddings, and metadata fields.
Show child attributes
Show child attributes
{
"fields": {
"body": {
"embed": {
"dimension": 1024,
"metric": "cosine",
"model": "llama-text-embed-v2"
},
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"sparse_embed": { "model": "pinecone-sparse-english-v0" },
"store_text": true,
"type": "string"
},
"title": {
"full_text_search": {
"language": "en",
"stemming": false,
"stop_words": false
},
"store_text": true,
"type": "string"
}
}
}
Custom user tags added to an index, at most 20 per index. Keys must be 80 characters or less and alphanumeric, '_', or '-'. Values must be 120 characters or less and consist of printable ASCII characters or spaces. To unset a key, set the value to be an empty string. null in responses when the index has no tags.
Show child attributes
Show child attributes
{ "tag0": "val0", "tag1": "val1" }
Was this page helpful?