Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

Delete a backup

Python
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

pc.delete_backup(backup_id="9947520e-d5a1-4418-a78d-9f464c9969da")
JavaScript
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })

await pc.deleteBackup('9947520e-d5a1-4418-a78d-9f464c9969da');
Java
import io.pinecone.clients.Pinecone;
import org.openapitools.db_control.client.ApiException;
import org.openapitools.db_control.client.model.*;

public class CreateBackup {
    public static void main(String[] args) throws ApiException {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();

        pc.deleteBackup("9947520e-d5a1-4418-a78d-9f464c9969da");
    }
}
Go
package main

import (
	"context"
	"encoding/json"
	"fmt"
	"log"

	"github.com/pinecone-io/go-pinecone/v4/pinecone"
)

func prettifyStruct(obj interface{}) string {
	bytes, _ := json.MarshalIndent(obj, "", "  ")
	return string(bytes)
}

func main() {
	ctx := context.Background()

	pc, err := pinecone.NewClient(pinecone.NewClientParams{
		ApiKey: "YOUR_API_KEY",
	})
	if err != nil {
		log.Fatalf("Failed to create Client: %v", err)
	}

	err = pc.DeleteBackup(ctx, "8c85e612-ed1c-4f97-9f8c-8194e07bcf71")
	if err != nil {
		log.Fatalf("Failed to delete backup: %v", err)
	} else {
		fmt.Println("Backup deleted successfully")
	}
}
C#
using Pinecone;

var pinecone = new PineconeClient("PINECONE_API_KEY");

await pinecone.Backups.DeleteAsync("9947520e-d5a1-4418-a78d-9f464c9969da");
curl
PINECONE_API_KEY="YOUR_API_KEY"
BACKUP_ID="9947520e-d5a1-4418-a78d-9f464c9969da"

curl -X DELETE "https://api.pinecone.io/backups/$BACKUP_ID" \
     -H "Api-Key: $PINECONE_API_KEY" \
     -H "X-Pinecone-Api-Version: 2025-04"

DELETE /backups/{backup_id}

cURL
curl --request DELETE \
  --url https://api.pinecone.io/backups/{backup_id} \
  --header 'Authorization: Bearer <token>'
401
{
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
  },
  "status": 429
}
  • Authorization (header, string, required) — Bearer authentication header of the form Bearer <token>.
  • backup_id (path, string, required) — The ID of the backup to delete.
  • 202 — The request to delete the backup has been accepted.
  • 401 — Unauthorized. Possible causes: Invalid API key.
  • 404 — Backup not found.
  • 412 — There is a pending restore job created from this backup.
  • 500 — Internal server error.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu