Creates an enabled backup schedule for an index.
The serverless or BYOC index to back up, such as product-catalog.
The schedule name, frequency, and number of days to retain each backup.
The schedule configuration, ID, and nextScheduledRun.
Errors.PineconeArgumentError when the index name or schedule name is empty.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const schedule = await pc.backupSchedules.create('product-catalog', {
name: 'catalog-daily',
frequency: 'daily',
retentionDays: 30,
});
console.log(schedule.scheduleId, schedule.nextScheduledRun);
Backups.create for a single backup.
Deletes a backup schedule, stopping future runs.
Existing backups remain until their retention window ends.
The ID of the schedule to delete.
Resolves when the schedule has been deleted.
Errors.PineconeArgumentError when the schedule ID is empty.
Retrieves a backup schedule configuration and its next run time.
The schedule ID returned by BackupSchedules.create or BackupSchedules.list.
The schedule configuration; nextScheduledRun is null while disabled.
Errors.PineconeArgumentError when the schedule ID is empty.
Lists one page of backups produced or planned by a schedule.
Check each backup status: the page can include runs that have not started.
The ID of the schedule whose history to list.
Optionaloptions: ListBackupSchedulesOptions
Page size and continuation token. Omit to fetch the first page with the default size.
Backups in data; pass pagination.next as paginationToken to fetch the next page.
Errors.PineconeArgumentError when the schedule ID is empty.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const page = await pc.backupSchedules.history('e88f7273-42aa-47e9-af73-593827136867');
for (const backup of page.data) {
console.log(backup.backupId, backup.status);
}
Backups.listByIndex for all backups of an index, including unscheduled backups.
Lists one page of enabled and disabled backup schedules for an index.
The index whose schedules to list.
Optionaloptions: ListBackupSchedulesOptions
Page size and continuation token. Omit to fetch the first page with the default size.
Schedules in data; pass pagination.next as paginationToken to fetch the next page.
Errors.PineconeArgumentError when the index name is empty.
Updates a backup schedule. Omitted fields remain unchanged.
The schedule name and index cannot be changed.
The ID of the schedule to update.
The frequency, retention, or enabled state to change. See UpdateBackupScheduleOptions for effects on existing backups and run times.
The updated schedule configuration and next run time.
Errors.PineconeArgumentError when the schedule ID is empty.
Backup schedules create index backups at a recurring cadence and retain them for a set number of days. Access them through Pinecone.backupSchedules; do not construct this class directly. Use Backups.create for a single backup.
Example