Automate and schedule MySQL database dumps from a docker container.

August 20, 2018 1.4k views
Ubuntu MySQL DigitalOcean Docker

What are the best practices of getting a daily backup of mysql database from a docker container and is it possible to send them to DigitalOcean Spaces. Is DigitalOcean Spaces secure enough to store backups?


1 Answer

@user000001 You have quite a few options for MySQL database backups in general.

  • Duplicity is a handy tool for keeping stuff nice and secure.
  • Object Storage like the DO Space’s offering isn’t the most ideal due to latency constraints. Usually, Spaces would be used for more of your static content, than constantly changing files.
  • I like creating DigitalOcean Volumes myself. Then you have the flexibility of attaching and detaching volumes between containers or easily migrating or snapshot it too. It works great for Docker persistent volume mountpoints.
  • Also, Encryption: Volumes are encrypted using the LUKS (Linux Unified Key Setup) specification. The entire storage cluster is encrypted, which ensures that snapshots of volumes are also encrypted at rest.
  • Give doctl a try too. It’s DigitalOcean’s official command line utility and a handy way to hook into the backend with scripts.
by Marko Mudrinić
DigitalOcean's web based control panel provides a convenient, point-and-click interface for managing Droplets. There are many times, however, when a command-line tool may be a preferable alternative. doctl, the official DigitalOcean command-line client, leverages the DigitalOcean API to provide access to most account and Droplet features.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!