Starts creating a backup of an index.
The index to back up, such as product-catalog.
Optionaloptions: CreateBackupResourceOptions
An optional name and description to help identify the backup.
The backup ID, source index, and current status; creation can still be in progress.
Errors.PineconeArgumentError when the index name is empty.
Starts restoring a backup into a new index.
Use RestoreJobs.describe to check progress after this call returns.
The ID of the backup to restore.
The new index name and optional tags, deletion protection, and read capacity.
The restoreJobId for tracking progress and indexId of the new index.
Errors.PineconeArgumentError when the backup ID or new index name is empty.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const result = await pc.backups.createIndex(
'11450b9f-96e5-47e5-9186-03f346b1f385',
{ name: 'product-catalog-restored' },
);
const job = await pc.restoreJobs.describe(result.restoreJobId);
console.log(job.status);
Indexes.create to create an empty index.
Deletes a backup.
Deletion is asynchronous; the backup may remain visible briefly after this call returns.
The ID of the backup to delete.
Resolves when the deletion request is accepted.
Errors.PineconeArgumentError when the backup ID is empty.
Retrieves the configuration and status of a backup.
The ID returned when the backup was created or listed.
The backup ID, source index, and current status.
Errors.PineconeArgumentError when the backup ID is empty.
Lists one page of backups across the project.
Optionaloptions: ListProjectBackupsOptions
Page size and continuation token. Omit to fetch the first page with the default size.
The backups in data; pass pagination.next as paginationToken to fetch the next page.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const page = await pc.backups.list({ limit: 10 });
console.log(page.data, page.pagination?.next);
Backups.listByIndex to list backups for a named index.
Lists one page of backups for an index.
The source index name, such as product-catalog.
Optionaloptions: ListIndexBackupsOptions
Pagination settings; set includeDeleted to include backups of deleted indexes with this name.
The backups in data; pass pagination.next as paginationToken to fetch the next page.
Errors.PineconeArgumentError when the index name is empty.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const page = await pc.backups.listByIndex('product-catalog', { limit: 10 });
console.log(page.data, page.pagination?.next);
Backups.list to list backups across the project.
Backups preserve index data for restoration into a new index. Access them through Pinecone.backups; do not construct this class directly. Use Collections for snapshots of pod-based indexes.
Example