How to Backup MySQL to SnapShooter Storage

Introduction

Backing up the MySQL database is an essential task of any database or system administrator. A backup will save your data in the event of system or database failure. In this case, you should consider an automated backup solution like SnapShooter to backup your MySQL database. SnapShooter provides an easier way to automate MySQL backup from the web-based interface.

SnapShooter has its own storage that allows you to store your MySQL database backup without using any third-party cloud storage. SnapShooter built a robust storage network that lives on top of Amazon S3. This gives you the power and redundancy of AWS. Also, SnapShooter Storage is available in every AWS region around the world.

This post will show you how to backup the MySQL database to SnapShooter Storage.

Connect MySQL Server to SnapShooter

Before starting, you will need to connect your SnapShooter Account to the server where your MySQL database is hosted.

First, go to the SnapShooter website and register for their 14-day free trial.

Next, log in to the SnapShooter and click on the Servers in the left sidebar. You should see the following screen:

Click on the Connect Server. You should see the following screen:

Now, copy and paste the following code shown on the above screen to your MySQL server.

curl -sSL "https://ingestor.snapshooter.com/api/server/add?token=eyJpdiI6IjU2RHVoRmZkL3dHRmtwbFU3ZXYwL0E9PSIsInZhbHVlIjoiemtoeE5CK05DNDRhcUcvaTFxOVJ4dz09IiwibWFjIjoiZGY5N2ZmM2VhM2Q1ZjUwZTQwMzg5NGFmY2Y4ODU5ZGI2YjZlNjMwODUwMzE2YWVkMTkyYjUyODYxMTNiOGUyNCIsInRhZyI6IiJ9&key=5895" | bash

Once your server is connected to the SnapShooter. You will get the following output:

Welcome to SnapShooter Server Setup
Environment Detected: OS: linux, OS Type: amd64
Installing SSH public key
Creating temp SSH key file
grep: /root/.ssh/authorized_keys: No such file or directory
cp: cannot stat '/root/.ssh/authorized_keys': No such file or directory
Creating authorized_keys backup /root/.ssh/authorized_keys.bak-1650962037
Key Installed /root/.ssh/authorized_keys
Removing temp SSH key file
Scanning SSH config
Checking 22
matched (22)
SSH test confirmed, Server Added to SnapShooter ...

Next, go back to your SnapShooter dashboard, you should see your added server on the following screen:

How to Backup MySQL Database to SnapShooter Storage

Next, you will need to create a backup job to automate MySQL database backup to SnapShooter Storage.

Follow the below steps to backup the MySQL database to SnapShooter Storage:

Step 1 - On the SnapShooter dashboard, click on the Backup Jobs in the left sidebar. You should see the following screen:

Step 2 - Click on the Create New Job. You should see the various database option on the following screen:

Step 3 - Click on the MySQL Database. You should see the following screen:

Step 4 - Define your backup name and click on the Continue button. You should see the Add Your Server screen:

Step 5 - Here, select your MySQL server which you have added in the previous step, and click on the Next button, you should see the following screen:

Step 6 - Provide MySQL database username, password, database, and click on the Test button to test the connection. If everything is fine, you should see the following screen:

Step 7 - Click on the Save and Next button. You should see the Storage Selection screen:

Step 8 - Here, you will need to define your SnapShooter Storage to store your database. Click on the Add New Storage Provider. You should see the following screen:

Step 9 - Click on the Use SnapShooter Storage button. You should see the following screen:

Step 10 - Select your SnapShooter Storage region and click on the Create Bucket button. You should see the job schedule screen:

Step 11 - Here, you can select the pre-defined backup schedule and backup retention policy then click on the Set Schedule and Finish button. You should see the following screen:

Step 12 - Click on the Backup Now button to run your first backup job. Once your backup job is executed successfully, you should see the following screen:

Depending on your compression level and the size of the backup, it may take time to complete. Every minute SnapShooter will go and check the process to see how far it has got. Using the Log button, you can see the latest state the backup is in.

Conclusion

In this guide, you learned how to backup the MySQL database to SnapShooter Storage. I hope you can now create your own backup policy using the SnapShooter.

Scheduled MySQL (Single Databases) Backups SnapShooter

Backup a single MySQL database to your external storage

Get started for free
No credit card required. Cancel anytime!

Was this page helpful?

Thank you for helping us improve!