Backing Up the etcd snapshot.db File for Kubernetes Disaster Recovery


To prepare for disaster recovery of your Kubernetes environment, perform periodic backups of the etcd snapshot.db file. First, use the etcdctl utility to get a snapshot of snapshot.db. Then, use the Commvault software to back up the snapshot to an off-host computer.


  1. To get a snapshot of snapshot.db, on the command line, enter the following command:

    $ ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshot.db

    You can automate these snapshots using crontab or another automation tool.

  2. Use one of the following methods in the Commvault software to back up snapshot.db to an off-host computer:

    • Full VM host backup: Commvault supports all major virtualization hypervisors to back up the entire VM host from the hypervisor level. Full VM host backups include the etcd snapshot in a consistent state.

    • File system backup: Commvault supports all major Linux distributions to back up the file system of your etcd host that includes the folder that contains the etcd snapshot.db file.

    • Network share backup: Commvault supports all major network share technologies (SMB, CIFS, and NFS) to export your etcd backups to a remote file server and to back up the network shares. including the etcd snapshot.db file.