What MySQL backup options are available?

  • Posted February 21, 2013

One of the features that I reply on my current VPS is MySQL backup as a built-in service, i.e. I can restore a database from any of the daily, weekly or monthly backup.

If I switch to DigitalOcean, is there something similar available? Or I have to manage my MySQL backups?


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

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.

@Kamal <br> <br>Yeah. I thought about that as an option. Probably as good a solution as any. On the master-slave option, maybe a tad of a performance hit not being in the same datacenter. Not sure. Either way, still a better solution. <br> <br>Thanks, Mike

@mikeg: You can have a backup droplet in another region so if anything happens to a specific datacenter/region, your data will still be there. <br> <br>You can also have a master-slave relationship with a mysql server in another datacenter so you can just switch the database server’s hostname in your app if the other one goes down.

I’m leaning toward replication vs full/incremental just because of in my mind there is less of a chance of data loss and recovery would be much faster. But, I am concerned that if I spin up another VPS just for backup, that how would I be able to guarantee that I wouldn’t lose both the primary and slave servers in the event of some sort of catastrophic failure at DO? Or just in general, is it safe to use another DO VPS as a backup server? <br> <br>Thanks, Mike

With a server on DigitalOcean you have multiple options:

  1. Rely on DigitalOcean daily backups, but it is very limited for MySQL since it is a snapshot backup of the whole server.
  2. Create your own backup script as mentioned in other comments.
  3. Or, use a service that handles this for you.

I’m one of the founders of so I’ll recommend to you to check our mysql backups option which you can pair with your DigitalOcean server and DigitalOcean Spaces as a storage for your daily database backups.

You can use automated backups, point in time user initiated snapshots, or you can setup a mysqldump that runs via crontab to another virtual server.

They offer daily backups (sometimes it misses a day here and there), though I’d recommend managing your own. DO is relatively cheap in comparison to Linode and multiple other providers, though they’re still just as reliable from experience over the past few months, but you really shouldn’t put all your eggs in one basket. <br> <br>You can use RSYNC to store backups off-site to another VPS, or server.