All Products
Search
Document Center

Cloud Backup:Back up MySQL

Last Updated:Jun 20, 2026

To protect your MySQL databases from data loss caused by disasters, hardware failures, data corruption, or accidental deletion, use Cloud Backup to back up your databases. Cloud Backup supports MySQL databases on Elastic Compute Service (ECS) instances or on-premises servers and stores the backups in the cloud. You can restore a database from a backup to a specific point in time to the original database or to another ECS or on-premises database in the same region. This topic describes how to back up a MySQL database.

Prerequisites

  • You have activated the Alibaba Cloud Cloud Backup service. Activating Cloud Backup is free of charge, but using the database backup feature of Cloud Backup incurs the following fees:

    • Database backup vault rental fee: Each user ID (UID) receives a 30-day free trial, which includes 100 GB of free storage per vault per month.

    • Database backup storage fee: You are charged for the storage space used by backups after deduplication and compression. A 30-day free trial is provided, after which tiered pricing applies.

    For more information, see Pricing.

  • You have registered your MySQL database on the Cloud Backup console.

  • For MySQL databases on ECS instances, use the precheck feature to identify potential issues. This includes checks for control network connectivity, Object Storage Service (OSS) connectivity, supported versions for full backups, and binary log (binlog) configuration. For more information, see Precheck a MySQL database on an ECS instance.

Usage notes

  • The on-premises server must be connected to an Alibaba Cloud Virtual Private Cloud (VPC) through an Express Connect circuit or a VPN connection. The network must allow access to the 100.64.0.0/10, 100.64.0.0/11, or 100.96.0.0/11 CIDR block. For more information, see Establish a connection between a VPC and an on-premises data center (single-tunnel mode).

  • The MySQL backup feature cannot be used if the anti-ransomware feature for databases is enabled. For more information about the anti-ransomware feature, see Anti-ransomware service overview.

  • The MySQL backup feature does not support databases that run in containers.

  • Limitations apply to the supported database versions, operating systems, and backup features. For example, MySQL on Windows is not supported. For more information, see Compatibility list and usage notes.

  • When you create a backup plan, select an appropriate backup vault. Back up each database instance to a single backup vault. Otherwise, incremental backups and log backups may be converted into full backups, which consume extra storage space in the backup vault.

  • If you use other backup software or scripts to perform full, incremental, or log backups at the same time, incremental and log backups performed by Cloud Backup are not affected. Note that some third-party software may lock the MySQL database during a full backup. This can block Cloud Backup jobs and cause delays. You may also notice a delay when you perform a full backup on the console.

  • The MySQL backup feature does not support backing up multiple MySQL instances running on a single machine (on-premises server or ECS instance).

  • The MySQL backup feature does not support backing up multi-version tables, such as tables where the INSTANT ADD/DROP column feature is enabled. You must rebuild the table to clear the multi-version information before you perform a backup.

Procedure

Important

Incremental backups and log backups depend on a valid full backup to form a complete recovery chain. To ensure that your backup plan can take effect immediately and your data is recoverable, perform a full backup manually immediately after creating the backup plan. This establishes a reliable baseline for future backups.

After a backup plan is created, its status is Running. Cloud Backup runs MySQL backup jobs based on the specified start time and backup interval. Perform the following steps:

  1. Log on to the Cloud Backup console.

  2. In the left-side navigation pane, choose Backup > Database Backup. Select a region and click the MySQL tab. Click the ECS Database Instance or Local Database Instance tab. Find the target MySQL instance, and in the Actions column, click Back Up.

  3. In the Create Backup Plan panel, configure the following parameters.

    1. Configure the backup content and click Next.

      1. Enter a Plan Name.

      2. Select the database instances that you want to back up. In the Selected section, select the checkboxes of the databases in the tree structure, for example, mysql and sys.

    2. Configure the backup schedule and click Next.

      Parameter

      Description

      Recommended Plan

      The recommended backup plan. Cloud Backup provides the following predefined backup policies. You can select a policy based on your business requirements or customize a policy.

      • Typical Plan: Enables the Full Backup and Incremental Backup features.

      • Critical Application: Enables the Full Backup, Incremental Backup, and Log Backup features.

      • Customize: Customize the backup type. You can select Incremental Backup or Real-time Backup, and set the start time and backup interval.

      Full Backup

      Backs up all database files on the operating system. You can restore data only to the specific point in time when the backup was created.

      You can run a one-time backup immediately or at a specified time, or run scheduled backups by hour, day, week, or month.

      Incremental Backup

      Backs up only the database files that have changed since the last backup. You can restore data only to the specific point in time when the backup was created.

      You can run a one-time backup immediately or at a specified time, or run scheduled backups by hour, day, week, or month.

      Important
      • Incremental backup is not supported for MySQL databases that use the MyISAM engine (versions earlier than MySQL 5.5). For these databases, Cloud Backup automatically converts incremental backups into full backups.

      • To restore data from an incremental backup, the most recent full backup is required. Therefore, the corresponding full backup is not released until the incremental backup expires. Configure the backup cycle and retention period based on your business requirements. For more information, see How are expired backups in a database backup vault cleaned up?.

      Log Backup

      Backs up database logs. You can back up logs at a fixed interval.

      You can run a one-time backup immediately or at a specified time, or run scheduled backups by hour, day, week, or month.

      Important
      • To restore data from a log backup, the most recent full backup is required. Therefore, the corresponding full backup is not released until the log backup expires. Configure the backup cycle and retention period based on your business requirements. For more information, see How are expired backups in a database backup vault cleaned up?.

      • If the node to be backed up is a slave node, you must set log_slave_updates=1 in the configuration file to ensure that log backups can be performed as expected. After you modify the configuration, we recommend that you perform a full backup before you perform a log backup.

      Realtime Backup

      Backs up database log data in real time.

      Before you enable this feature, you must perform a full backup. After this feature is enabled, database logs are continuously backed up, which can achieve a recovery point objective (RPO) of seconds. Real-time backup is free of charge during the free trial period. After the free trial period ends, you are immediately charged for the storage used by real-time backups. For more information about pricing, see Pricing.

      Important

      Only one backup plan that includes real-time backup is allowed for each MySQL database instance.

    3. Configure backup options and click Next.

      Parameter

      Description

      Concurrent Threads

      The number of concurrent threads for a backup job.

      Retry Time

      The time the system waits to reconnect to the database if the connection is interrupted during a backup. Unit: minutes.

      Speed Limit

      The maximum data transfer rate for a backup. Unit: MB/s.

      Note

      A value of 0 indicates no speed limit.

    4. Configure the backup vault and click OK.

      Important

      An instance can be backed up to only one backup vault. You cannot back up an instance to multiple backup vaults.

      Parameter

      Description

      Backup Vault

      Configure the backup vault where backups are stored.

      • Create Vault: Enter a name for the new backup vault. If you leave this parameter empty, a random name is assigned.

      • Select Vault: Select an existing backup vault from the drop-down list.

      Important

      After a backup vault is created, you are charged a rental fee for the backup vault regardless of whether backup data is generated. For more information, see Billing methods and billable items.

      To ensure the highest level of data redundancy, Cloud Backup automatically uses a zone-redundant backup vault if the selected region supports zone-redundant storage. If the region supports only locally redundant storage, a locally redundant backup vault is used. You do not need to manually select the vault redundancy type.

      Vault Name

      The name of the backup vault.

      Backup Retention Period

      The retention period for backups. You can select Day, Week, Month, or Year as the time unit.

      You can change the backup retention period on the vault management page. The change applies to all new backups in the vault. Backups are automatically deleted after the retention period expires.

      Important

      To restore data from an incremental backup or a log backup, the most recent full backup is required. Therefore, the corresponding full backup is not released until the incremental or log backup expires. Configure the backup cycle and retention period based on your business requirements. For more information, see How are expired backups in a database backup vault cleaned up?.

Verify backup

  • After the backup plan is created, you can view its details on the Backup Plans tab. The details include the next run time and interval for full, incremental, and log backups. Cloud Backup runs MySQL database backup jobs based on the specified start time and interval.

  • When the scheduled backup time is reached, Cloud Backup starts the backup plan. The current backup job is complete when the Status of the backup plan is Idle and a time is displayed in the Next Run column.

FAQ

More operations

On the Backup Plan tab, you can perform the following operations in the Actions column for a backup plan.

  • Edit a backup plan

    Click Edit to modify the backup plan.

  • Configure alert settings

    Click in the Actions column and select Alert Settings. Then, select a backup alert method.

    Backup alert method

    Description

    Disabled

    The client no longer sends alert notifications.

    Same as Backup Vault

    The client uses the same alert method as the backup vault.

    Notify Alibaba Cloud Account

    Sends alert notifications by email to the Alibaba Cloud account.

    Custom

    Select one or more contacts or contact groups. After the configuration is complete, the client sends backup alerts to the selected contacts or contact groups.

  • Delete a backup plan

    Deleting a backup plan interrupts any running backup and restore jobs.

    Click in the Actions column and select Delete Backup to delete a backup plan that is no longer needed.

Next steps

Restore a MySQL database

Related documents