Follow these steps to back up etcd data by creating a snapshot. This snapshot can be saved and used at a later time if you need to restore etcd.
Prerequisites
-
SSH access to a master host.
Procedure
-
Access a master host as the root user.
-
Run the
etcd-snapshot-backup.shscript and pass in the location to save the etcd snapshot to.$ sudo /usr/local/bin/etcd-snapshot-backup.sh ./assets/backup/snapshot.db
In this example, the snapshot is saved to
./assets/backup/snapshot.dbon the master host.