# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
response = pc.create_index_from_backup(
backup_id="a65ff585-d987-4da5-a622-72e19a6ed5f4",
name="restored-index",
tags={
"tag0": "val0",
"tag1": "val1",
},
deletion_protection="enabled",
timeout=-1, # Return the restore job ID without waiting for the index
)
print(response)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const response = await pc.backups.createIndex(
'a65ff585-d987-4da5-a622-72e19a6ed5f4',
{
name: 'restored-index',
tags: {
tag0: 'val0',
tag1: 'val1',
},
deletionProtection: 'enabled',
},
);
console.log(response);
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)
}
deletionProtection := pinecone.DeletionProtectionEnabled
tags := pinecone.IndexTags{
"tag0": "val0",
"tag1": "val1",
}
response, err := pc.CreateIndexFromBackup(ctx, &pinecone.CreateIndexFromBackupParams{
BackupId: "a65ff585-d987-4da5-a622-72e19a6ed5f4",
Name: "restored-index",
Tags: &tags,
DeletionProtection: &deletionProtection,
})
if err != nil {
log.Fatalf("Failed to create index from backup: %v", err)
}
out, err := json.MarshalIndent(response, "", " ")
if err != nil {
log.Fatalf("Failed to marshal response: %v", err)
}
fmt.Println(string(out))
}
PINECONE_API_KEY="YOUR_API_KEY"
BACKUP_ID="a65ff585-d987-4da5-a622-72e19a6ed5f4"
curl "https://api.pinecone.io/backups/$BACKUP_ID/create-index" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07" \
-H 'Content-Type: application/json' \
-d '{
"name": "restored-index",
"tags": {
"tag0": "val0",
"tag1": "val1"
},
"deletion_protection": "enabled"
}'
{
"restore_job_id": "670e8400-e29b-41d4-a716-446655440000",
"index_id": "123e4567-e89b-12d3-a456-426614174000"
}Create an index from a backup
Create an index from a backup.
The restored index inherits the schema of the index the backup was taken from, including its full-text search fields and its embedding configuration (embed / sparse_embed fields, or the semantic_text field of a legacy integrated index created via create-for-model), and the request cannot override it. A backup that carries no schema restores an index whose fields are derived from the source index’s dimension, metric, and vector type, and reported under the reserved _values / _sparse_values names.
By default, the index is created where the backup was taken: the same cloud and region for a serverless backup, or the same environment for a BYOC backup. To restore a serverless backup into another region of the same cloud, set deployment to a managed deployment in that region. Cross-cloud restore is not supported, a serverless backup cannot be restored into a BYOC environment, and a BYOC backup can only be restored into the environment it was taken in.
You can optionally set read_capacity so the restored index is created with dedicated read nodes (DRN) instead of defaulting to on-demand capacity.
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
response = pc.create_index_from_backup(
backup_id="a65ff585-d987-4da5-a622-72e19a6ed5f4",
name="restored-index",
tags={
"tag0": "val0",
"tag1": "val1",
},
deletion_protection="enabled",
timeout=-1, # Return the restore job ID without waiting for the index
)
print(response)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const response = await pc.backups.createIndex(
'a65ff585-d987-4da5-a622-72e19a6ed5f4',
{
name: 'restored-index',
tags: {
tag0: 'val0',
tag1: 'val1',
},
deletionProtection: 'enabled',
},
);
console.log(response);
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)
}
deletionProtection := pinecone.DeletionProtectionEnabled
tags := pinecone.IndexTags{
"tag0": "val0",
"tag1": "val1",
}
response, err := pc.CreateIndexFromBackup(ctx, &pinecone.CreateIndexFromBackupParams{
BackupId: "a65ff585-d987-4da5-a622-72e19a6ed5f4",
Name: "restored-index",
Tags: &tags,
DeletionProtection: &deletionProtection,
})
if err != nil {
log.Fatalf("Failed to create index from backup: %v", err)
}
out, err := json.MarshalIndent(response, "", " ")
if err != nil {
log.Fatalf("Failed to marshal response: %v", err)
}
fmt.Println(string(out))
}
PINECONE_API_KEY="YOUR_API_KEY"
BACKUP_ID="a65ff585-d987-4da5-a622-72e19a6ed5f4"
curl "https://api.pinecone.io/backups/$BACKUP_ID/create-index" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07" \
-H 'Content-Type: application/json' \
-d '{
"name": "restored-index",
"tags": {
"tag0": "val0",
"tag1": "val1"
},
"deletion_protection": "enabled"
}'
{
"restore_job_id": "670e8400-e29b-41d4-a716-446655440000",
"index_id": "123e4567-e89b-12d3-a456-426614174000"
}# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
response = pc.create_index_from_backup(
backup_id="a65ff585-d987-4da5-a622-72e19a6ed5f4",
name="restored-index",
tags={
"tag0": "val0",
"tag1": "val1",
},
deletion_protection="enabled",
timeout=-1, # Return the restore job ID without waiting for the index
)
print(response)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const response = await pc.backups.createIndex(
'a65ff585-d987-4da5-a622-72e19a6ed5f4',
{
name: 'restored-index',
tags: {
tag0: 'val0',
tag1: 'val1',
},
deletionProtection: 'enabled',
},
);
console.log(response);
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)
}
deletionProtection := pinecone.DeletionProtectionEnabled
tags := pinecone.IndexTags{
"tag0": "val0",
"tag1": "val1",
}
response, err := pc.CreateIndexFromBackup(ctx, &pinecone.CreateIndexFromBackupParams{
BackupId: "a65ff585-d987-4da5-a622-72e19a6ed5f4",
Name: "restored-index",
Tags: &tags,
DeletionProtection: &deletionProtection,
})
if err != nil {
log.Fatalf("Failed to create index from backup: %v", err)
}
out, err := json.MarshalIndent(response, "", " ")
if err != nil {
log.Fatalf("Failed to marshal response: %v", err)
}
fmt.Println(string(out))
}
PINECONE_API_KEY="YOUR_API_KEY"
BACKUP_ID="a65ff585-d987-4da5-a622-72e19a6ed5f4"
curl "https://api.pinecone.io/backups/$BACKUP_ID/create-index" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07" \
-H 'Content-Type: application/json' \
-d '{
"name": "restored-index",
"tags": {
"tag0": "val0",
"tag1": "val1"
},
"deletion_protection": "enabled"
}'
Authorizations
An API Key is required to call Pinecone APIs. Get yours from the console.
Body
The configuration needed to create a Pinecone index from a backup.
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" }
Whether deletion protection is enabled/disabled for the index.
Possible values: disabled or enabled.
By default the index will be created with read capacity mode OnDemand, for managed and BYOC indexes alike. If you prefer to allocate dedicated read nodes for your workload, you must specify mode Dedicated and additional configurations for node_type and scaling.
- On-demand
- Dedicated
Show child attributes
Show child attributes
{ "mode": "OnDemand" }
Where to create the index. Defaults to the cloud and region, or the BYOC environment, the backup was taken in.
managed: A serverless index in the given cloud and region. The cloud must match the backup's cloud.byoc: A BYOC index. The environment must be the one the backup was taken in.
- Serverless
- BYOC
Show child attributes
Show child attributes
{
"cloud": "aws",
"deployment_type": "managed",
"region": "us-east-1"
}
Response
The request to create the index has been accepted.
Was this page helpful?