Cli: [RFC] Add a command to backup/restore Swarm state

Created on 2 Jun 2017  路  3Comments  路  Source: docker/cli

In reaction to https://github.com/moby/moby/issues/33462, I was discussing with @diogomonica that if we consider the secrets store in swarm to be the "source of truth" (i.e., not just a "copy" of secrets stored/managed elsewhere), that there should be an easy way to backup and restore the swarm state, without users having to dive into /var/lib/docker/swarm to create an archive.

SwarmKit _does_ have a tool to dump this data https://github.com/docker/swarmkit/blob/master/cmd/swarm-rafttool/dump.go, but AFAIK, this is not exposed through the docker CLI

Use-cases;

  • backing up swarm state
  • support (sending swarm state for investigation)
  • migrating a cluster to new hardware / disaster recovery

Given that that directory contains both the _data_, and keys to decrypt the data, perhaps keys and data should be exported separately, so that data can be backed-up, and transported safely

/cc @aaronlehmann

areswarm kinfeature

Most helpful comment

Any updates on this?

All 3 comments

Yes please.

Any updates on this?

really missing feature.
any update?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kinghuang picture kinghuang  路  4Comments

bryanhuntesl picture bryanhuntesl  路  3Comments

dnephin picture dnephin  路  3Comments

mapio picture mapio  路  4Comments

Ingosmar89219 picture Ingosmar89219  路  3Comments