Backing up the cluster configuration

The important data on managers is stored in /var/lib/docker/swarm. Here we have:

  • The certificates in certificates/
  • The Raft status with Etcd logs and snapshots in raft/
  • The tasks database in worker/
  • Other less crucial information, such as the current manager status, the current connection socket, and so on.

It's a good idea to set up a periodical backup of this data, in case recovery is needed.

The space used by the Raft log depends on the number of tasks spawned onto the cluster and on how frequently their states change. For 200,000 containers, the Raft log can grow up to around 1GB of disk space every three hours. A log entry of each task occupies around 5 KB. Consequently, the log rotation policies for the Raft log directory, /var/lib/docker/swarm/raft, should be calibrated more or less aggressively, which depends on the available disk space.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset