colinmollenhour / mariadb-galera-swarm

MariaDb Galera Cluster container based on official mariadb image which can auto-bootstrap and recover cluster state.
https://hub.docker.com/r/colinmollenhour/mariadb-galera-swarm
Apache License 2.0
217 stars 102 forks source link

Backup method #35

Closed ariselseng closed 6 years ago

ariselseng commented 6 years ago

Hi, It could be great to have a way in this image to do database dumps. or perhaps this is already possible?

colinmollenhour commented 6 years ago

The tools needed to do various types of backups are all in the image, just call them with docker exec or docker run or connect to the database remotely. I'd recommend xtrabackup, which is included in the image (percona-toolkit). Here is a wrapper script that is not included in the image but you could add it in yourself in a new image or with "docker cp" or just add it to your data directory assuming it is bind-mounted to a volume or host directory.

https://gist.github.com/colinmollenhour/16d8d92d2ecddddcfa7f0a991d11e830

ariselseng commented 6 years ago

Thank you so much for that.