# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
schedule = pc.backup_schedules.create(
index_name="docs-example",
name="example-backup-schedule",
frequency="daily",
retention_days=7,
)
print(schedule)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const schedule = await pc.backupSchedules.create('docs-example', {
name: 'example-backup-schedule',
frequency: 'daily',
retentionDays: 7,
});
console.log(schedule);
curl -sS -X POST "https://api.pinecone.io/indexes/${INDEX_NAME}/backup-schedules" \
-H "api-key: ${PINECONE_API_KEY}" \
-H "X-Pinecone-Api-Version: 2026-07" \
-H "Content-Type: application/json" \
-d '{
"name": "example-backup-schedule",
"schedule": {
"type": "time-based",
"frequency": "daily"
},
"retention": {
"expire_after_days": 7
}
}'
Backup schedules
Create backup schedule
Create a recurring backup schedule for a Pinecone serverless or BYOC index using the API, including daily, weekly, or monthly frequency and retention policy.
POST
/
indexes
/
{index_name}
/
backup-schedules
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
schedule = pc.backup_schedules.create(
index_name="docs-example",
name="example-backup-schedule",
frequency="daily",
retention_days=7,
)
print(schedule)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const schedule = await pc.backupSchedules.create('docs-example', {
name: 'example-backup-schedule',
frequency: 'daily',
retentionDays: 7,
});
console.log(schedule);
curl -sS -X POST "https://api.pinecone.io/indexes/${INDEX_NAME}/backup-schedules" \
-H "api-key: ${PINECONE_API_KEY}" \
-H "X-Pinecone-Api-Version: 2026-07" \
-H "Content-Type: application/json" \
-d '{
"name": "example-backup-schedule",
"schedule": {
"type": "time-based",
"frequency": "daily"
},
"retention": {
"expire_after_days": 7
}
}'
This endpoint requires
X-Pinecone-Api-Version: 2026-07.Path parameters
string
required
The name of the index to create a backup schedule for.
Body parameters
string
required
A human-readable name for the backup schedule. Backups created by the schedule are automatically named
{name}-{ISO8601_timestamp}.object
required
object
required
The retention policy for backups created by this schedule.
Show retention properties
Show retention properties
integer
required
The number of days after which backups created by this schedule are automatically deleted.
Error responses
| Status | Description |
|---|---|
| 403 | Scheduled backups are not available for your plan. |
| 404 | Index not found. |
| 409 | This index already has an enabled backup schedule. Disable or delete it first. |
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
schedule = pc.backup_schedules.create(
index_name="docs-example",
name="example-backup-schedule",
frequency="daily",
retention_days=7,
)
print(schedule)
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
const schedule = await pc.backupSchedules.create('docs-example', {
name: 'example-backup-schedule',
frequency: 'daily',
retentionDays: 7,
});
console.log(schedule);
curl -sS -X POST "https://api.pinecone.io/indexes/${INDEX_NAME}/backup-schedules" \
-H "api-key: ${PINECONE_API_KEY}" \
-H "X-Pinecone-Api-Version: 2026-07" \
-H "Content-Type: application/json" \
-d '{
"name": "example-backup-schedule",
"schedule": {
"type": "time-based",
"frequency": "daily"
},
"retention": {
"expire_after_days": 7
}
}'
Was this page helpful?