Operations
Backup And Restores
Monitoring
tpl
This guide demonstrates how to create and validate full backups for Qdrant clusters on KubeBlocks using the pg-basebackup
method through both:
We will cover how to restore data from a backup in the Restore From Full Backup guide.
Before proceeding, ensure the following:
kubectl create ns demo
namespace/demo created
KubeBlocks uses a declarative approach for managing Qdrant Clusters. Below is an example configuration for deploying a Qdrant Cluster with 3 replicas.
Apply the following YAML configuration to deploy the cluster:
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: qdrant-cluster
namespace: demo
spec:
terminationPolicy: Delete
clusterDef: qdrant
topology: cluster
componentSpecs:
- name: qdrant
serviceVersion: 1.10.0
replicas: 3
resources:
limits:
cpu: "0.5"
memory: "0.5Gi"
requests:
cpu: "0.5"
memory: "0.5Gi"
volumeClaimTemplates:
- name: data
spec:
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
Monitor the cluster status until it transitions to the Running state:
kubectl get cluster qdrant-cluster -n demo -w
Expected Output:
kubectl get cluster qdrant-cluster -n demo
NAME CLUSTER-DEFINITION TERMINATION-POLICY STATUS AGE
qdrant-cluster qdrant Delete Creating 49s
qdrant-cluster qdrant Delete Running 62s
Check the pod status and roles:
kubectl get pods -l app.kubernetes.io/instance=qdrant-cluster -n demo
Expected Output:
NAME READY STATUS RESTARTS AGE
qdrant-cluster-qdrant-0 2/2 Running 0 1m43s
qdrant-cluster-qdrant-1 2/2 Running 0 1m28s
qdrant-cluster-qdrant-2 2/2 Running 0 1m14s
Once the cluster status becomes Running, your Qdrant cluster is ready for use.
If you are creating the cluster for the very first time, it may take some time to pull images before running.
Before creating backups, ensure:
Backup repository is configured:
BackupRepo
resource existsBackupRepo
status shows "Ready"Cluster is ready:
Check available backup policies and schedules:
# List backup policies
kubectl get backuppolicy -n demo -l app.kubernetes.io/instance=qdrant-cluster
# List backup schedules
kubectl get backupschedule -n demo -l app.kubernetes.io/instance=qdrant-cluster
Expected Output:
NAME BACKUP-REPO STATUS AGE
qdrant-cluster-qdrant-backup-policy Available 36m
NAME STATUS AGE
qdrant-cluster-qdrant-backup-schedule Available 36m
View supported backup methods in the BackupPolicy CR 'qdrant-cluster-qdrant-backup-policy':
kubectl get backuppolicy qdrant-cluster-qdrant-backup-policy -n demo -oyaml | yq '.spec.backupMethods[].name'
List of Backup methods
KubeBlocks Qdrant supports these backup methods:
Feature | Method | Description |
---|---|---|
Full Backup | datafile | uses HTTP API snapshot to create snapshot for all collections. |
The datafile
method backup the data files of the database
Apply this manifest to create a backup:
apiVersion: dataprotection.kubeblocks.io/v1alpha1
kind: Backup
metadata:
name: qdrant-backup-datafile
namespace: demo
spec:
# Specifies the backup method name that is defined in the backup policy.
# - datafile
backupMethod: datafile
# Specifies the backup policy to be applied for this backup.
backupPolicyName: qdrant-cluster-qdrant-backup-policy
# Determines whether the backup contents stored in the backup repository should be deleted when the backup custom resource(CR) is deleted. Supported values are `Retain` and `Delete`.
# - `Retain` means that the backup content and its physical snapshot on backup repository are kept.
# - `Delete` means that the backup content and its physical snapshot on backup repository are deleted.
deletionPolicy: Delete
Track progress until status shows "Completed":
kubectl get backup qdrant-backup-datafile -n demo -w
Example Output:
NAME POLICY METHOD REPO STATUS TOTAL-SIZE DURATION DELETION-POLICY CREATION-TIME COMPLETION-TIME EXPIRATION-TIME
qdrant-backup-datafile qdrant-cluster-qdrant-backup-policy datafile <BACKUP_REPO> Completed 0 10s Delete 2025-05-18T15:43:53Z 2025-05-18T15:44:02Z
Confirm successful completion by checking:
The Backup
resource records details including:
Execute a backup using the OpsRequest API with the 'pg-basebackup' method:
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: qdrant-cluster-backup
namespace: demo
spec:
clusterName: qdrant-cluster
force: false
backup:
backupPolicyName: qdrant-cluster-qdrant-backup-policy
backupMethod: datafile
deletionPolicy: Delete
retentionPeriod: 1mo
type: Backup
Track backup progress in real-time:
kubectl get ops qdrant-cluster-backup -n demo -w
Expected Output:
NAME TYPE CLUSTER STATUS PROGRESS AGE
qdrant-cluster-backup Backup qdrant-cluster Running -/- 5s
qdrant-cluster-backup Backup qdrant-cluster Succeed -/- 10s
Check the final backup status:
kubectl get backup -n demo -l operations.kubeblocks.io/ops-name=qdrant-cluster-backup
Example Output:
NAME POLICY METHOD REPO STATUS TOTAL-SIZE DURATION DELETION-POLICY CREATION-TIME COMPLETION-TIME EXPIRATION-TIME
backup-demo-qdrant-cluster-20250518154515 qdrant-cluster-qdrant-backup-policy datafile <BACKUP_REPO> Completed 0 10s Delete 2025-05-18T15:45:15Z 2025-05-18T15:45:25Z 2025-06-17T15:45:25Z
Confirm successful completion by checking:
The Backup
resource records details including:
This guide covered:
Your Qdrant data is now securely backed up and ready for restoration when needed.