How to Manually Restore MySQL Database Clusters from Backups

MySQL is an open source, object-relational database built with speed and reliability in mind. Its large and active developer community has created many third-party applications, tools, and libraries that expand MySQL’s functionality.

DigitalOcean Managed Databases automatically handle recovery from hardware and software failures by replacing degraded nodes with new ones that resume directly from the point of failure. To recover from situations like a database administrator or application accidentally destroying data, you can manually restore a MySQL database cluster from backups.

When you restore from a backup, we create a new copy of your cluster’s primary node. You cannot restore directly into the primary node itself because this creates alternative timelines for the database that introduce unwarranted complexity in a managed service. By restoring into a new primary node, a single linear timeline history is preserved.

MySQL cluster backups are automatically created once per day and retained for 7 days. Backups do not result in downtime or performance degradation, and the time of day at which they run is set automatically by DigitalOcean and cannot be changed.

Restore a MySQL Cluster from Backups

To restore from a backup, from the Databases page, click the name of the MySQL database you want to restore to go to its Overview page, then click the Actions button and choose Restore from backup from the menu.

Screenshot of MySQL Actions menu
If you cannot select Restore from backup, it means that you have hit the limit of database clusters for the account or team. You can delete a cluster or contact our support team for a limit increase.

In the Create a new cluster from a backup window that opens, choose whether you want to restore to the latest transaction available or choose a point in time, then choose a name for the new database. By default, the name is the original databases’ name appended with the date of the backup and the word “backup”, like originalname-aug-13-backup.

When you’re ready, click Restore to New Cluster to begin the restoration. The time it takes to create the new cluster depends on the amount of data in the original.

When the restoration completes, you can add standby nodes and read-only nodes as needed.

Destroying a database cluster destroys the backups of that database. Make sure you download any important data before you destroy a cluster.