POST
/
backups
/
{backup_id}
/
create-index
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.create_index_from_backup(
    backup_id="a65ff585-d987-4da5-a622-72e19a6ed5f4",
    name="restored-index",
    tags={
        "tag0": "val0", 
        "tag1": "val1"
    },
    deletion_protection="enabled"
)
{'deletion_protection': 'enabled',
 'dimension': 1024,
 'embed': {'dimension': 1024,
           'field_map': {'text': 'chunk_text'},
           'metric': 'cosine',
           'model': 'multilingual-e5-large',
           'read_parameters': {'input_type': 'query', 'truncate': 'END'},
           'vector_type': 'dense',
           'write_parameters': {'input_type': 'passage', 'truncate': 'END'}},
 'host': 'example-dense-index-python3-govk0nt.svc.aped-4627-b74a.pinecone.io',
 'metric': 'cosine',
 'name': 'example-dense-index-python3',
 'spec': {'serverless': {'cloud': 'aws', 'region': 'us-east-1'}},
 'status': {'ready': True, 'state': 'Ready'},
 'tags': {'tag0': 'val0', 'tag1': 'val1'},
 'vector_type': 'dense'}
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.create_index_from_backup(
    backup_id="a65ff585-d987-4da5-a622-72e19a6ed5f4",
    name="restored-index",
    tags={
        "tag0": "val0", 
        "tag1": "val1"
    },
    deletion_protection="enabled"
)
{'deletion_protection': 'enabled',
 'dimension': 1024,
 'embed': {'dimension': 1024,
           'field_map': {'text': 'chunk_text'},
           'metric': 'cosine',
           'model': 'multilingual-e5-large',
           'read_parameters': {'input_type': 'query', 'truncate': 'END'},
           'vector_type': 'dense',
           'write_parameters': {'input_type': 'passage', 'truncate': 'END'}},
 'host': 'example-dense-index-python3-govk0nt.svc.aped-4627-b74a.pinecone.io',
 'metric': 'cosine',
 'name': 'example-dense-index-python3',
 'spec': {'serverless': {'cloud': 'aws', 'region': 'us-east-1'}},
 'status': {'ready': True, 'state': 'Ready'},
 'tags': {'tag0': 'val0', 'tag1': 'val1'},
 'vector_type': 'dense'}

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours from the console.

Path Parameters

backup_id
string
required

The ID of the backup to create an index from.

Body

application/json

The desired configuration for the index created from a backup.

The configuration needed to create a Pinecone index from a backup.

name
string
required

The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.

Required string length: 1 - 45
Example:

"example-index"

tags
object

Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '', or '-'. Values must be alphanumeric, ';', '@', '', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.

Example:
{ "tag0": "val0", "tag1": "val1" }
deletion_protection
enum<string>
default:disabled

Whether deletion protection is enabled/disabled for the index.

Available options:
disabled,
enabled

Response

The request to create the index has been accepted.

The response for creating an index from a backup.

restore_job_id
string
required

The ID of the restore job that was created.

Example:

"670e8400-e29b-41d4-a716-446655440000"

index_id
string
required

The ID of the index that was created from the backup.

Example:

"123e4567-e89b-12d3-a456-426614174000"