Volume backup silently uploads an empty tar when the volume does not exist on the host (stack prefix missing / service on swarm worker)
Los mantenedores suelen responder en 1 día
@imrja8 ya está trabajando en esto.
Desde el 1/12/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- docker, typescript
Línea de trabajo
Empieza en packages/server/src/utils/volume-backups/backup.ts, donde se ensambla el comando docker run --rm -v ${volumeName}:/volume_data ... y su salida se transmite al log de backup. Añade una comprobación con docker volume inspect "$VOLUME" (o --mount type=volume,src=...,volume-nocopy) antes de la ejecución y dirige el fallo al mismo camino de error que usan las ramas de fallo existentes, para que la ejecución se marque como fallida en lugar de registrar Volume backup done ✅. Hecho significa que un nombre de volumen inexistente produce un error claro y ningún tar subido, mientras que un volumen válido sigue respaldándose; el código hermano de backup de base de datos es una referencia útil para ver cómo se exponen los errores.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
To Reproduce
- Create a Docker Compose service of type Stack (swarm) with a named volume, e.g.
pgdata. Docker creates it as<appName>_pgdata. - Add a volume backup with volume name
pgdata, i.e. without the stack prefix. The UI accepts any string. - Alternative way to trigger it: use the correct full name, but pin the service to a worker node. The backup command always runs on the Dokploy/manager server, so the volume does not exist there.
- Run the volume backup, manually or on its schedule.
Current vs. Expected behavior
Current: The backup runs docker run --rm -v ${volumeName}:/volume_data ... ubuntu tar cvf ... (packages/server/src/utils/volume-backups/backup.ts). If no volume with that name exists on the host, docker run silently creates a new empty volume, and an empty tar of 10240 bytes is uploaded. The log ends with Volume backup done ✅ / Upload to S3 done ✅, so nothing tells you the backup is useless.
We only found out when we needed a restore. A Postgres volume had been "backed up" every night for two months, and all 60 retained files were empty tars. Seven of our 17 volume backups were affected:
- some because the stack prefix was missing from the configured name,
- some because the service runs on a swarm worker.
Each run also leaves an empty stray volume with the configured name on the manager.
Expected:
- The backup fails with a clear error if the volume does not exist on the host where the command runs. For example, check
docker volume inspect "$VOLUME"before thedocker run, or use--mount type=volume,src=...,volume-nocopy. Plain-vauto-creates the volume, so it does not help here. - Optionally, the UI validates or suggests the real volume name (including the
<appName>_prefix for stacks). - Optionally, a warning when the backed-up volume is empty.
The swarm worker case is the broader limitation tracked in #2692, and #3516 covers it for database backups. Database backups at least fail with Container not found there. Volume backups report success instead, which is the dangerous part.
Provide environment information
Dokploy version: v0.31.1 (code checked against v0.31.2, same behavior)
OS: Debian 13
Setup: 2-node Docker Swarm (Dokploy on the manager, services on manager and worker), Compose type "Stack"
Destination: S3-compatible
Which area(s) are affected? (Select all that apply)
Docker Compose, Docker
Are you deploying the applications where Dokploy is installed or on a remote server?
Both
Additional context
Minimal demonstration of the root cause:
docker volume ls -q | grep -x does-not-exist # nothing
docker run --rm -v does-not-exist:/volume_data ubuntu bash -c 'cd /volume_data && tar cf - . | wc -c'
# 10240 -> empty tar, exit code 0
docker volume ls -q | grep -x does-not-exist # now exists (created by the run)
Will you send a PR to fix it?
No
- Lenguaje dominante
- TypeScript
- Estrellas
- 38.8k
- Forks
- 3.2k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 117
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Dokploy/dokploy
-
Docker > Volumes: sorting by Size does nothing, and text columns sort inconsistentlyPosiblemente ocupada @BitPluto la tomó hoy. Abiertoneeds-triage🔍
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Dokploy/dokploy#6203 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-triage🔍
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Dokploy/dokploy#6197 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tabPosiblemente ocupada @AyhamJo7 la tomó hace 7 días. Abiertoneeds-triage🔍
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Dokploy/dokploy#6115 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
MongoDB with Replica Sets enabled: container exits with code 0 and restarts in a loop (generated startup script never waits on mongod)Posiblemente ocupada @ghazy2001 la tomó hace 13 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Dokploy/dokploy#6051 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dokploy monitoring API returns partial container metrics with HTTP 200 when a row read failsPosiblemente ocupada @PAtreju la tomó hace 15 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Dokploy/dokploy#6029 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Dokploy/dokploy
Issues similares
-
🔨 tool 🧰 library
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Orange-OpenSource/Orange-Boosted-Bootstrap#4035 ·
Los mantenedores suelen responder en 1 día
-
Ajouter la page Plan du siteAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
DISIC/teleservice-conformite#230 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
rothgar/rabble.radio#410 ·
Los mantenedores suelen responder en 1 día
-
area/webapp comp/desktop P2 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NousResearch/hermes-agent#163341 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
smart-village-solutions/smart-speech-flow#765 ·
Los mantenedores suelen responder en 1 día