Dokploy / Dokploy/dokploy

Database backup in swarm mode

Open
#2,692 6 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

Related to this issue https://github.com/Dokploy/dokploy/issues/2269

We cannot use Dokploy's backup feature on databases that are located on different nodes than the Dokploy node itself.

Dokploy features should be fully functional in swarm mode. Currently, it operates in a degraded mode.
Our team chose Dokploy specifically for this feature: the ability to backup any database at any time, restore it, and perform rollbacks across our entire platform. We are now facing a significant issue because we assumed this was the default behavior, regardless of whether we're using a swarm cluster or not.

Describe the solution you'd like

Be able to backup database, volume backup, in a swarm cluster.

Remote server functionality can connect to remote SSH servers. So maybe it should be possible to connect directly to the container itself and run commands on the specific node instead.

We could also use docker context :

  • Create a context for each node : docker context create worker1 --docker "host=ssh://user@worker1"
  • Find which node exec the service : NODE=$(docker service ps myservice --format '{{.Node}}' | head -n1)
  • Switch to the good node context : docker context use $NODE
  • Execute backup command

This should also resolve docker terminal issue on swarm node

Describe alternatives you've considered

Adding a dedicated tool to handle this, but it seems like unnecessary duplication of functionality...

Additional context

At least update the documentation to clearly indicate what is/is not compatible with docker swarm

Will you send a PR to implement it?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the related issue #2269 and tracing how database and volume backups, restores, rollbacks, and Docker terminal operations handle services on swarm nodes. Compare the proposed remote SSH and Docker context approaches, then define what swarm compatibility should cover and document which Docker Swarm configurations are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
databases, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.