Backing up etcd data

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
  1. Access a master host as the root user.

  2. Run the etcd-snapshot-backup.sh script 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.db on the master host.