All Products
Search
Document Center

Database Backup:Create a backup schedule

Last Updated:Jan 22, 2024

You can use the Database Backup (DBS) console or call API operations to create a backup schedule to back up and restore your database. This topic describes how to create a backup schedule in the DBS console.

Prerequisites

  • An Alibaba Cloud account is created. For more information, see Sign up with Alibaba Cloud.

  • The AliyunDBSDefaultRole role is assigned to DBS and Object Storage Service (OSS) is activated if you use DBS for the first time. For more information, see How do I activate DBS?

  • The AliyunDBSFullAccess policy is attached to a Resource Access Management (RAM) user if you create a subscription backup schedule as the RAM user. For more information about how to authorize a RAM user, see Grant permissions to a RAM user.

Billing

The purchase fee of a backup schedule is subject to the final price displayed on the buy page.

Note
  • If you back up a large amount of data, we recommend that you purchase a backup instance storage plan provided by DBS to offset the storage fees of built-in DBS storage for the backup schedule. For more information about how to purchase a storage plan, see the FAQ section of this topic.

  • For information about fees that may be incurred for a backup schedule, see Billing FAQ.

Usage notes

  • You cannot create pay-as-you-go backup schedules in the DBS console. You can create only subscription backup schedules in the DBS console.

    Note

    If you use the data archive feature in the Data Management (DMS) console, the system creates a pay-as-you-go backup schedule in the DBS console. You are charged for the backup schedule based on the amount of data that is backed up. For more information, see Backup fees.

  • If the databases and tables that you want to back up involve issues such as unreasonable table schemas, large tables, or large fields, and you select a low-specification backup schedule type, the resources of the backup schedule may be insufficient to back up the databases or tables. In this case, backup exceptions occur. To prevent backup exceptions, we recommend that you select a high-specification backup schedule type.

Procedure

  1. Log on to the Database Backup (DBS) console.

  2. In the left-side navigation pane, click Backup Schedules. In the top navigation bar, select a region.

  3. On the Backup Schedules page, click Create Schedule in the upper-right corner to go to the DBS buy page.

  4. Configure the following parameters and click Buy and Start in the lower-right corner of the page.

    Parameter

    Description

    Product Type

    The billing method of the backup schedule that you want to purchase. Select Backup Instance.

    Note

    You cannot create a pay-as-you-go backup schedule in the DBS console.

    Region for Backup Instance

    The region in which you want to store the backup data.

    Note
    • Backup in the same region: Select the region in which the database to be backed up resides.

    • Geo-redundancy: Select a region different from that of the database to be backed up. This method provides a better disaster recovery capability but may charge you additional fees. For example, if you want to back up a database from the China (Beijing) region to DBS in the China (Shanghai) region, select the China (Shanghai) region. For more information, see Overview.

    Data Source Type

    The data source type of the database to be backed up.

    Note

    If the data source is an ApsaraDB RDS for MySQL instance, a self-managed MySQL database, or a PolarDB for MySQL cluster, select MySQL. For more information about how to select a data source type, see Database engines and features.

    Specification

    The backup schedule specifications that you want to use. Higher specifications offer higher backup and restoration performance. DBS supports the following backup schedule specifications: micro, small, medium, large, and xlarge. The xlarge specification type provides extra large specifications without an upper limit on the amount of backup data.

    • To ensure fast backup and restoration of specific database instances, such as database instances in the production environment, we recommend that you select the xlarge or large specification type.

    • If you do not require high backup and restoration performance, you can select the most cost-effective backup schedule specifications based on your business requirements. For more information, see Select a backup schedule type.

    • If the databases and tables that you want to back up involve issues such as unreasonable table schemas, large tables, or large fields, and you select a low-specification backup schedule type, the resources of the backup schedule may be insufficient to back up the databases or tables. In this case, backup exceptions occur. To prevent backup exceptions, we recommend that you select a high-specification backup schedule type.

    Backup Method

    The backup method that you want to use. Valid values:

    • Physical Backup: You can perform a physical backup only on self-managed databases, but not ApsaraDB RDS instances.

      You can use this method to back up database files in the operating system. In most cases, physical backup and restoration are faster than logical backup and restoration. You can also use a sandbox instance for emergency disaster recovery. For more information, see Restore a self-managed MySQL database in an emergency.

    • Logical Backup: You can perform a logical backup on ApsaraDB RDS instances, self-managed databases in data centers, and self-managed databases hosted on Elastic Compute Service (ECS) instances.

      You can use this method to back up database objects, including tables, indexes, and stored procedures. DBS allows you to back up specified databases and tables in a fine-grained way. For more information, see Restore data by database or table.

    Note

    For information about the definitions of and differences between logical backup and physical backup, see Logical backup, physical backup, and snapshot-based backup and Select a backup method.

    Storage Size

    The storage capacity of the backup schedule that you want to purchase. You do not need to specify the storage capacity when you purchase a backup schedule. You are charged for the amount of your data that is stored in DBS.

    Note
    • If you back up a large amount of data, we recommend that you purchase a backup instance storage plan provided by DBS to offset the storage fees of built-in DBS storage for the backup schedule. For more information about how to purchase a storage plan, see the FAQ section of this topic.

    • For information about fees that may be incurred for a backup schedule, see Billing FAQ.

    Resource Group

    The resource group that is used by the backup schedule. You can select the default resource group or a custom resource group to facilitate backup schedule management.

    Quantity

    The number of backup schedules that you want to purchase.

    Note
    • A backup schedule can be used to back up only one database instance. To back up multiple database instances, you must purchase multiple backup schedules. For example, if you want to back up ApsaraDB RDS for MySQL Instance A and ApsaraDB RDS for MySQL Instance B, you must purchase two backup schedules.

    • A backup schedule can be used to back up only one type of database. To back up multiple types of databases, you must purchase multiple backup schedules. For example, if you want to back up a self-managed SQL Server database and a self-managed MySQL database, you must purchase two backup schedules.

    Subscription Duration

    The subscription duration for the backup schedule that you want to purchase.

  5. On the Confirm Order page, confirm your order information, read and agree to the agreements by selecting the check box in the Terms of Service section, and then click Pay.

    After you pay for the order, go to the Backup Schedules page to view the new backup schedule.

What to do next

After a backup schedule is created, you must configure the backup schedule, such as specifying the databases or tables to be backed up, backup frequency, storage method, and backup cycle. For more information, see Configure a backup schedule or Backup and restoration overview.

Related API operations

You can call the CreateBackupPlan operation to create a backup schedule. You can also call the CreateAndStartBackupPlan operation to create, configure, and start a backup schedule. For more information, see CreateBackupPlan or CreateAndStartBackupPlan.

References

  • For information about backup and restoration scenarios, such as backup to the cloud, geo-redundancy, backup security, and quick restoration, see Common scenarios.

  • For more information about DBS, see What is DBS?

FAQ

How do I determine whether I need to purchase a storage plan?

You can determine whether to purchase a storage plan based on the following scenarios:

  • If you store backup data in the built-in storage pool of DBS, we recommend that you purchase a storage plan to offset the storage fees. By default, you are charged for using the built-in storage pool on a pay-as-you-go basis. Storage plans are more cost-effective than the pay-as-you-go billing method. Storage plans of higher specifications provide larger discounts. For more information, see Use storage plans.

  • If you configure a backup schedule to back up data to an OSS bucket or a self-managed NAS file system, you do not need to purchase a storage plan because you are not charged storage fees.

How do I determine whether I need to purchase a network plan?

You can determine whether to purchase a network plan based on the following scenarios:

  • If you enable geo-redundancy in the ApsaraDB RDS console, we recommend that you purchase a network plan to offset the network traffic fees that are generated for backing up data across regions in the ApsaraDB RDS console. You are charged by DBS for the amount of cross-region backup data on a pay-as-you-go basis. Network plans are more cost-effective than the pay-as-you-go billing method. Network plans of higher specifications provide larger discounts. For more information, see Use network plans.

  • If you back up ApsaraDB RDS instances, self-managed databases hosted on ECS instances, self-managed databases in data centers, or databases hosted on third-party cloud services in the DBS console, you are not charged network traffic fees. This is because the data is backed up over the Internet or by using Express Connect, VPN Gateway, or Smart Access Gateway that you configure. Therefore, you do not need to purchase a network plan.

Can I create a pay-as-you-go backup schedule in the DBS console?

You cannot create pay-as-you-go backup schedules in the DBS console. You can create only subscription backup schedules in the DBS console.

Note

If you use the data archive feature in the Data Management (DMS) console, the system creates a pay-as-you-go backup schedule in the DBS console. You are charged for the backup schedule based on the amount of data that is backed up. For more information, see Backup fees.

Can I change the backup method of a backup schedule from physical backup to logical backup after I purchase the backup schedule?

No, you cannot change the backup method of a backup schedule after you purchase the backup schedule.

Is the performance of a database affected when I use DBS to back up the database?

When DBS performs a backup task on a database, the database performance is affected. Therefore, we recommend that you run backup tasks during off-peak hours. For more information, see Impact of backups on databases.