Question

How do I start automatic database backups on ?

I want system should take automatic backups.

So if any issue occurs for database then we can restore the database from that recent backup taken by system.


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I use automysqlbackup and it works flawlessly for daily / weekly / monthly database backups.

Tutorial: Scroll down to the section that says “How to Backup MySQL Information using automysqlbackup”

Once you install it, you can run an on demand backup with this command:

sudo automysqlbackup

Hello there,

You would need to have setup backups or a snapshot of a service like SnapShooter.

You can also create a cron job to dump the database and then use rsync or scp to copy the database backup to a remote server.

Regards

You have several options to get this done:

  1. Rely on DigitalOcean Snapshot mechanism: easiest to get started with, but you won’t have control on when your backup is scheduled (only on a weekly base) nor where you store these backups
  2. Use a dedicated solution to do handle this: several exist (full disclosure, I have created one of these solution), easy to setup and can store your backups wherever you want and have control over schedule and what you want to backups (not necessarily your entire server, but just the database or some files…)
  3. Create your own backup script: depending on your needs and your skills you can quickly get started with your own backup script, which won’t offer all the flexibility you might need but can be helpful as well.

Here is a tutorial explaining you how to build your own MySQL backups script.

Laurent - SimpleBackups.io