cli icon indicating copy to clipboard operation
cli copied to clipboard

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

Open thaJeztah opened this issue 9 years ago • 4 comments

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

thaJeztah avatar Jun 02 '17 10:06 thaJeztah

Yes please.

gaui avatar Dec 10 '17 20:12 gaui

Any updates on this?

hichamuntitled avatar Mar 15 '18 16:03 hichamuntitled

really missing feature. any update?

avielb avatar Apr 02 '18 11:04 avielb

really missing feature. any update?

emrecio avatar May 03 '23 22:05 emrecio