From e4bb183afa852070fb7986d80986ccebe7a20f18 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Thu, 5 Aug 2021 21:56:19 +0200 Subject: [PATCH] add note about applying memory limit when running in swarm mode --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 567b26b..a369d01 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,20 @@ volumes: By default, Docker Swarm will restart stopped containers automatically, even when manually stopped. If you plan to have your containers / services stopped during backup, this means you need to apply the `on-failure` restart policy to your service's definitions. A restart policy of `always` is not compatible with this tool. +--- + +When running in Swarm mode, it's also advised to set a hard memory limit on your service (~25MB should be enough in that case): + +```yml +services: + backup: + image: offen/docker-volume-backup:latest + deployment: + resources: + limits: + memory: 25M +``` + ## Manually triggering a backup You can manually trigger a backup run outside of the defined cron schedule by executing the `backup` command inside the container: