How to backup MySQL to Backblaze

MySQL database backup stored in your Backblaze B2 Bucket.

At SimpleBackups, we started looking into Backblaze for their B2 cloud solution and I must say we've been very positively surprised by their solution. When you start with Backblaze, and already know about S3, you're not in a foreign territory. Everything is easy to set up and getting your first backup stored there is super easy.

Let's get ready, and get this this done in under 5 minutes (you'll see, it's really easy to get your first MySQL database backup automated).


1. Create your Backblaze Bucket

Create your Backblaze Bucket form

Good job! Your bucket is created.

Confirmation of the Bucket creation

Don't leave the Backblaze interface yet, we'll now have to create your credentials.

Information you'll need in step 3:

  • Your Bucket name, in this case "myacme-bucket"
  • Your Bucket region, in this case "us-west-002"

2. Create your Bucket credentials

Great! Now that we have a Bucket, we need to create the credentials required to access it.

Fill in the form by defining:

  • Name of the Key: we like to use a reference of the Bucket we're creating the credentials for
  • Allow access to Bucket(s): select your Bucket (step 1)

Leave the rest of the option empty and create your key.

You'll get a confirmation message including your KeyID and applicationKey, which is what we need to connect your storage to SimpleBackups.

Application Key confirmation message including required credentials information

Information you'll need in step 3:

  • applicationKey
  • KeyID

3. Connect your Bucket to SimpleBackups

So far we have created a Bucket and have created the required credentials to get access to this it. The only remaining step is connecting this new storage to SimpleBackups.

  • Log into SimpleBackups and head to the connect your storage page
  • Select "Backblaze B2" as storage provider and fill in the "Connect your storage" form with the information from step 1 and 2.

SimpleBackups form to connect your Backblaze B2 storage

You'll have to input :

  • Key: KeyID described in (step 2)
  • Secret: applicationKey described in (step 2)
  • Region: Bucket region described in (step 1)
  • Bucket: Bucket name described in (step 1)
  • Give your storage a name (usually we like to use the Bucket name) and click on "Save new storage".

You'll be redirected to the list of storage where you'll find your newly connected storage.

Storage list with newly created Backblaze storage

... Yes that's all it takes !

4. Final step: Create your MySQL backup

Alright, let's now move on to our last step and get that MySQL backup created!

With SimpleBackups you can backup MySQL databases as well as PostgreSQL and mongoDB, but also any files. In this step I'll cover how to get a MySQL backup created but you'll quickly understand this applies to any kind of backups you might need.

Configuration form, for a MySQL database backup

What would you like to back up? (A)

  • Select "Database" (in this article we're creating a MySQL backup only)
  • Select your database server (if you haven't yet configured any server check our "get your server configured" article first)

How often should we make this backup? (B)

  • Select your schedule option (here we picked a daily schedule)

    You can select a pre-defined schedule (daily, weekly, monthly) or a custom option allowing you to schedule it whenever you want to use CRON syntax.

  • Example of CRON schedule for "20:00 every Tuesday" = 0 22 * * 2

    Finally, the "On demand" option won't schedule anything but will allow you to trigger the backup manually or using our API.

  • Define the backup retention, which is the number of backups you want to keep (kind of the history length of your backup if you prefer)

Choose the database you need to backup (C)

  • Select the type of your database, in this case "MySQL"
  • Fill in the database connection form

Finalize and create

  • Pick the name of your backup (this is how it will be displayed in SimpleBackups interface) and where you want to store it.
  • Select your Storage (step 3)

That's it, your MySQL backup is now ready and connected to your Backblaze bucket.

Let us know how long it took you to get your backup fully configured (current record is 4 minutes) :-)

Run it once manually (using the "Run" backup button from the backups list) and you'll trigger your first backup!

Ready to automate your backups?

Sign up for FREE. Get started in less than one minute.

Secure your backups

No credit card required. Free 7-day trial.