Backup and restore the deployment

Improve this page by contributing to our documentation.

Two different approaches are available to back up and restore Bitnami etcd Helm chart deployments on Kubernetes:

  • Back up the data from the source deployment and restore it in a new deployment using etcd’s built-in backup/restore tools.
  • Back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool.

Method 1: Backup and restore data using etcd’s built-in tools

This method involves the following steps:

  • Use the etcdctl tool to create a snapshot of the data in the source cluster.
  • Make the snapshot available in a Kubernetes PersistentVolumeClaim (PVC) that supports ReadWriteMany access (for example, a PVC created with the NFS storage class)
  • Restore the data snapshot in a new cluster using the Bitnami etcd Helm chart’s startFromSnapshot.existingClaim and startFromSnapshot.snapshotFilename parameters to define the source PVC and source filename for the snapshot.

NOTE: Under this approach, it is important to create the new deployment on the destination cluster using the same credentials as the original deployment on the source cluster.

Method 2: Back up and restore persistent data volumes

This method involves copying the persistent data volumes for the etcd nodes and reusing them in a new deployment with Velero, an open source Kubernetes backup/restore tool. This method is only suitable when:

This method involves the following steps:

  • Install Velero on the source and destination clusters.
  • Use Velero to back up the PersistentVolumes (PVs) used by the etcd deployment on the source cluster.
  • Use Velero to restore the backed-up PVs on the destination cluster.
  • Create a new etcd deployment on the destination cluster with the same deployment name, credentials and other parameters as the original. This new deployment will use the restored PVs and hence the original data.

Refer to our detailed tutorial on backing up and restoring etcd chart deployments on Kubernetes, which covers both these approaches, for more information.