KubeBlocks
BlogsKubeBlocks Cloud
⌘K
​

Overview

Introduction
Concepts
Kubernetes and Operator 101
Supported addons
About this manual

Try out KubeBlocks with Playground

Try out KubeBlocks on cloud
Try out KubeBlocks on laptop

Installation

Prerequisite for Local Env

Prerequisite for Local Env
Install kbcli
Install KubeBlocks
Install Addons
Uninstall KubeBlocks and kbcli

Upgrade KubeBlocks

Upgrade to v0.8
Upgrade to v0.9.0
Upgrade to v0.9.3
FAQ

Connect Database

Overview
Testing environment
Production environment

Maintenance

Scale

Horizontal Scale
Vertical Scale

Backup and Restore

Introduction

Backup

Configure BackupRepo
Configure BackupPolicy
Scheduled backup
On-demand backup

Restore

Restore from backup set
PITR

In Place Update

Overview on in-place update
Enable in-place update

Resource Scheduling

Configure pod affinity for database clusters

Cross K8s Deployment

Deploy a Cluster across Multiple Kubernetes Clusters by KubeBlocks

Instance Template

Introduction of instance template
Apply instance template

Observability

Monitor database
Configure alert

User Management

Manage user accounts

Handle an Exception

Handle an exception
Full disk lock

Developer

Developer guides
Terminology

Add an add-on to KubeBlocks

Add-ons of KubeBlocks
Add an add-on
Backup and restore
Parameter template
Parameter configuration
Monitoring
Multi-component configuration
Environment variables and placeholders

External Component

Reference external component

API Reference

Cluster
Backup
Add-On

    Restore data from backup set

    KubeBlocks supports restoring clusters from backups with the following instructions.

    1. View backups.

      kubectl get backups
      

      For existing clusters, execute:

      kbcli cluster list-backups mysql-cluster
      

      If the cluster has been deleted, execute:

      kbcli dataprotection list-backups
      
    2. Restore clusters from a specific backup.

      You can set the connectionPassword.annotations of the restored cluster as that of the original cluster. The password of the original cluster can be accessed by viewing the annotation of dataprotection.kubeblocks.io/connection-password in the backup YAML file.

      kubectl apply -f - <<-'EOF'
      apiVersion: apps.kubeblocks.io/v1alpha1
      kind: Cluster
      metadata:
        name: myrestore
        namespace: default
        annotations:
          kubeblocks.io/restore-from-backup: '{"mysql":{"name":"mybackup","namespace":"default","connectionPassword": "Bw1cR15mzfldc9hzGuK4m1BZQOzha6aBb1i9nlvoBdoE9to4"}}'
      spec:
        clusterDefinitionRef: apecloud-mysql
        clusterVersionRef: ac-mysql-8.0.30
        terminationPolicy: WipeOut
        componentSpecs:
          - name: mysql
            componentDefRef: mysql
            replicas: 1
            volumeClaimTemplates:
              - name: data
                spec:
                  accessModes:
                    - ReadWriteOnce
                  resources:
                    requests:
                      storage: 20Gi
      EOF
      
      # Restore new cluster
      kbcli cluster restore myrestore --backup mybackup
      >
      Cluster myrestore created
      
      # View the status of the restored cluster
      kbcli cluster list myrestore
      >
      NAME        NAMESPACE   CLUSTER-DEFINITION   VERSION           TERMINATION-POLICY   STATUS    CREATED-TIME
      myrestore   default     apecloud-mysql       ac-mysql-8.0.30   Delete               Running   Oct 30,2023 16:26 UTC+0800
      
    3. Connect to the restored cluster for verification. Once the cluster status is Running, connect to the cluster for verification.

    © 2025 ApeCloud PTE. Ltd.