Backups of the your etcd deployment consist of a snapshot of the keyspace made through the etcdctl snapshot utility. Any snapshot can be used to restore the data into a new Compose etcd3 deployment. You may also download each snapshot to suit your own backup retension needs. More information on managing your backups, schedules, and retention can be found on the Backups page.
It is possible to take your own backup snapshots using etcdctl. Using the
etcdctl connection string from your deployment, use the
snapshot save command to take a snapshot of the cluster. The snapshot is saved locally in the directory on the machine where the command is run. For example:
ETCDCTL_API=3 etcdctl --endpoints=https://portal2521-17.intrepid-etcd-50.compose-34.composedb.com:16635,https://portal2181-20.intrepid-etcd-50.compose-34.composedb.com:16635 --user=root:[password] snapshot save snapshot.db
The snapshot.db file will be the backup of your etcd cluster.
Since backup files are available for you to download, it is possible to run etcd locally with a copy of your data. To start your backup from a downloaded snapshot:
- Install etcd for your system.
- Set environment variable
- Run the restore
etcdctl snapshot restore snapshot.db.
- Start etcd in the directory you restored to.
- Access the keyspaces and issue commands through etcdctl using the credentials provided with your deployment.
If this article didn't solve things, summon a human and get some help!
Updated about a year ago