I want to backup my gitlab container. There are two options:
docker exec -ti my.gitlab.container sh -c "/opt/gitlab/bin/gitlab-rake gitlab:backup:create"
OR
docker run -d --rm --volumes-from my.gitlab.container gitlab-ce sh -c "/opt/gitlab/bin/gitlab-rake gitlab:backup:create"
The second creates a whole needless container. But does it add any value?
Is something wrong with the first one?
Both are perfectly valid.
The volumes-from method can be run even if the github container is stopped. Also were the only method since docker exec is relatively new.
The docker exec way can be used even if the data is not stored in volumes.
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With