How to Back Up MySQL Servers with SnapShooter

SnapShooter is a cloud backup and recovery solution. Use SnapShooter to back up servers, volumes, databases, and applications from DigitalOcean and other cloud providers.

Use SnapShooter to automatically create backups for a MySQL database server and store them in S3-based storage of your choice.

Connect a Server and Storage Provider

First, connect your server to your SnapShooter account.

Connect servers directly to SnapShooter to set up backup jobs, which run using SnapShooter’s custom engine to back up hosted resources (like files, databases, and applications) to your chosen S3-based storage provider.

Next, choose a storage provider.

You can use SnapShooter as your storage provider with SnapShooter Simple Storage, which lets you store backup data without setting up your own storage. Alternatively, you can set up DigitalOcean Spaces Object Storage or other storage providers, like AWS S3.

Create the Backup Job

Then, from the SnapShooter app, in the left menu under Backups, click Backup Jobs. On the Backup Jobs page, click the green Create New Job in the top right to go to the jobs creation page.

On the jobs creation page, click MySQL All Databases. A new section about the job appears at the bottom of the screen. Enter a name for the job, then click Continue.

On the Choose Server page, under Own Compute, click Use My Servers. In the Choose Server section, select the server you want to back up. If you didn’t add it earlier, you can also connect it from this page.

Once you select a server, click Next.

On the Configure Backup page, in the Set Config Variables section, enter the MySQL username, password, host, and port. Optionally, in the Scripts section, you can add any pre- or post-backup scripts.

When you finish filling out the options, click the Test button to confirm that the configuration works. Then, in the Test Output section, underneath the successful output, click Save and Continue.

On the Connect Storage page, select the storage provider that you want to use to store the backups. You can also connect a new storage provider from this page.

Finally, on the Setup Schedule Primary page, choose the frequency of backups, then click Set Schedule and Finish.

On the detail page for your server, you can see the backup configuration and schedule. You can also click Backup Now to run a backup job manually.

We recommend manually running the first job to confirm that it works. Depending on the compression level and the size of the backup, it may take some time to complete. Every minute, SnapShooter checks the job’s progress and reports it on the Log section.

Once the job completes, check your storage provider for the backup files.