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:
Go to the Backup vault > +Backup to open the Configure backup page.
To create a new backup policy, under Backup policy, select Create new.
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.
On the Schedule + retention tab, define the Backup schedule.
Define the Retention settings.
You can add one or more retention rules. To add more retention rules, select Add.
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.
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:
On the Azure portal, go to Backup vault > +Backup.
Alternatively, go to Backup center > +Backup.
Select the backup policy you created, which defines the backup schedule and the retention duration.
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.
Select Add and choose the Azure Database for MySQL - Flexible Server that you want to back up.
After the selection, the backup readiness check validates to ensure the configuration is correct.
To resolve any access issues, select Assign missing roles.
Review the configuration details, and then select Configure Backup.
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:
Go to the Backup vault > Backup Instances, and then select the backup instance for which you want to take backup.
Select Backup Now.
On the MySQL database instance page, choose a retention rule from the list.
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.
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.