Automate and schedule MySQL database dumps from a docker container.

Posted August 20, 2018 3.7k views

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?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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.