ETCD – Backup and Restore

Sometime you crash the ETCD. Restore the previous stable configuration seem to be a best way to recovery.

Download a binary of ETCD Manager

Visit https://github.com/kopeio/etcd-manager/tags and download the latest stable version.

As of Feb 2, 2024 the tag 3.0.20210228 is the most recent one.

List available backup

There are two types of ETCD, main and event.

etcd-manager-ctl-linux-amd64 --backup-store=s3://my-app-kops/my-cluster/backups/etcd/main list-backups

Take a note of the backup name you want

For example 2024-01-29T23:10:15Z-000165

etcd-manager-ctl-linux-amd64 --backup-store=s3://my-app-kops/my-cluster/backups/etcd/event list-backups

Take a note of the backup name you want

For example 2024-01-29T23:06:42Z-000164

Restore from selected backup

Restore main ETCD first

etcd-manager-ctl-linux-amd64 --backup-store=s3://my-app-kops/my-cluster/backups/etcd/main restore-backup 2024-01-29T23:10:15Z-000165

Then restore event ETCD

etcd-manager-ctl-linux-amd64 --backup-store=s3://my-app-kops/my-cluster/backups/etcd/events restore-backup 2024-01-29T23:06:42Z-000164