Answer the question
In order to leave comments, you need to log in
How to make a backup when stopping a Docker container?
Hello!
There is a container, I can make a database archive at any time with my hands.
But in addition, I would like to have the dump done automatically when the container stops. In fact, you just need to understand how to run a command in the terminal when you stop.
Glad for any help, thanks.
Answer the question
In order to leave comments, you need to log in
1. Move the data from the container to a separate directory on the host
2. Write a wrapper sh script and stop containers through it - and in the script, describe everything your heart desires.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question