Back up the Azure Database for MySQL - Flexible Server by using Azure Backup (preview)

Important

Preview solution for protection of Azure Database for MySQL - Flexible Servers using Azure Backup is currently paused. Please refrain from configuring any new backups until further notice. Be assured, all existing backup data is safe and available for restore.

This article describes how to back up the Azure Database for MySQL - Flexible Server by using Azure Backup.

Important

  • Currently, this feature supports only the Weekly backup option. However, you can schedule the backups on multiple days of the week.
  • Retention duration ranges from 7 days to 10 years in the Backup data store.
  • Each retention rule requires inputs for specific backups, data store, and retention duration for the backups.
  • The retention rules are evaluated in a pre-determined order of priority. The priority is the highest for the yearly rule, followed by the monthly, and then the weekly rule. Default retention settings are applied when no other rules qualify. For example, the same recovery point may be the first successful backup taken every week as well as the first successful backup taken every month. However, as the monthly rule priority is higher than that of the weekly rule, the retention corresponding to the first successful backup taken every month applies.
  • By default, the retention rule is set to 3 months if no retention rule is set.

Learn more about the supported scenarios. considerations, and limitations.

Create a backup policy for the Azure MySQL - Flexible Server database backup

To create a backup policy, follow these steps:

  1. Create a Backup vault.

  2. Go to the Backup vault > +Backup to open the Configure backup page.

  3. To create a new backup policy, under Backup policy, select Create new.

    Screenshot shows how to start creating the new backup policy.

  4. On the Create Backup Policy page, enter a name for the new policy, and then select Azure Database for MySQL (Preview) as the Datasource type.

  5. On the Schedule + retention tab, define the Backup schedule.

    Screenshot shows the process to configure the backup schedule.

    Define the Retention settings.

    Screenshot shows how to configure the retention duration.

    You can add one or more retention rules. To add more retention rules, select Add.

  6. You can move the backups from backup data store to archive data store once they expire as per the backup policy.

    To archive backups on expiry, select On-expiry.

    Note

    • Retention duration ranges from 7 days to 10 years in the Backup data store.
    • As per the pre-determined order of priority, the retention with the yearly rule selected has the highest priority, followed by the monthly, and then the weekly rule. By default, the retention rule is set to 3 months if no retention rule is set.
  7. Select Review + create.

Configure backup on Azure Database for MySQL - Flexible Server

You can configure backup for the entire Azure databases for MySQL - Flexible Server.

To configure backup, follow these steps:

  1. On the Azure portal, go to Backup vault > +Backup.

    Screenshot shows how to start the backup configuration.

    Screenshot shows the Basic tab on the configuration page.

    Alternatively, go to Backup center > +Backup.

  2. Select the backup policy you created, which defines the backup schedule and the retention duration.

    Screenshot shows the selection of the backup policy.

  3. Select the Azure Database for MySQL - Flexible Server to back up.

    You can choose an Azure Database for MySQL - Flexible Servers across subscriptions if they're in the same region as that of the vault.

    Screenshot shows the selection of the database server for backup.

  4. Select Add and choose the Azure Database for MySQL - Flexible Server that you want to back up.

    Screenshot shows the selection of the datasource type.

    After the selection, the backup readiness check validates to ensure the configuration is correct.

    Screenshot shows the validation is successful.

  5. To resolve any access issues, select Assign missing roles.

  6. Review the configuration details, and then select Configure Backup.

    Screenshot shows how to finish the backup configuration.

    To track the progress, go to Backup Instances.

Run an on-demand backup

To trigger an on-demand backup (that's not in the schedule specified in the policy), follow these steps:

  1. Go to the Backup vault > Backup Instances, and then select the backup instance for which you want to take backup.

  2. Select Backup Now.

    Screenshot shows how to run an on-demand backup.

  3. On the MySQL database instance page, choose a retention rule from the list.

  4. Select Backup now.

Monitor a backup job

Azure Backup creates a job for scheduled backups or if you trigger on-demand backup operation for tracking. To view the backup job status, go to Backup jobs.

Screenshot shows the list of backup jobs.

It shows the Backup jobs dashboard with the operations and status for the past seven days. You can select the time range and other filters to narrow down your selection.

To view the status of all backup jobs, select All as the Status. The ongoing and past jobs of the backup instance appear.

Screenshot shows how to view all jobs.

Next steps