All Products
Search
Document Center

Database Backup:Create a backup policy template

Last Updated:Dec 29, 2023

Database Backup (DBS) allows you to create a backup policy template. A backup policy template contains configuration items for a backup schedule, such as the backup method, storage method, backup frequency, backup cycle, and backup start time. This topic describes how to create a backup policy template. This helps you better back up your databases.

Procedure

  1. Log on to the DBS console. In the left-side navigation pane, click Backup Strategies. In the top navigation bar of the Backup Strategy List page, select a region.

  2. Click Add backup strategy in the upper-left corner of the page.

  3. On the Create Policy Template page, configure the Policy Name parameter.

  4. Configure the backup policy and click OK in the lower-left corner of the page.

    image.png

    1. Select a backup method. You can select Logical Backup or Physical Backup.

      • Logical Backup: You can perform a logical backup on ApsaraDB RDS instances, PolarDB instances, ApsaraDB for Redis instances, ApsaraDB for MongoDB instances, on-premises databases, and self-managed databases hosted on Elastic Compute Service (ECS) instances.

      • Physical Backup: You can perform a physical backup only on self-managed databases.

      Note

      You cannot modify this parameter after the backup policy template is created. For more information, see Database engines and features.

    2. Click Modify to the right of backup policy. In the dialog box that appears, configure the parameters for the backup policy. Then, click OK. The following table describes the parameters.

      Parameter

      Description

      Full Backup Method

      The method that is used to perform full backups. Valid values:

      • Periodic Backup: performs full backups on a specific periodic basis.

      • Single Backup

      Full Backup Frequency

      The interval at which full backups are performed. Default value: Every Week. You can perform one to seven full backups every week.

      Note

      This parameter is available only if you set the Full Backup Method parameter to Periodic Backup.

      Full Backup Cycle

      The days of the week when full backups are performed. You can select one or more days of a week.

      Start At

      The start time of each full backup. You can select an exact hour of the day.

      Note

      If a previous full backup is not complete at the start time of the next backup, DBS skips the next backup.

      Incremental Backup Interval

      The interval at which incremental backups are performed. Unit: minutes. Valid values: 10, 20, 30, 40, 50, and 60. Default value: 10.

      For example, if you set the interval to 10 minutes, DBS performs an incremental backup every 10 minutes.

      Note
      • This parameter is available only if you select Physical Backup as the backup method.

      • If you select Logical Backup as the backup method of a database such as a MySQL database and DBS allows you to enable the incremental backup feature for the database, incremental backups are performed in real time. For more information, see Database engines and features or Backup and restoration overview.

    3. Click Modify to the right of Level-1 Storage Pool (Backup). In the dialog box that appears, configure the parameters to specify a level-1 storage pool. Then, click OK. The following table describes the parameters.

      Parameter

      Description

      Storage Type

      You can select DBS Storage, NAS, or OSS For User.

      Note
      • You can select NAS or OSS For User only if you select Logical Backup as the backup method and have joined the public preview.

      • If the Storage Type parameter is set to NAS for the level-1 storage pool, you cannot configure a level-2 storage pool.

      • If you have joined the public preview and you need to set this parameter to NAS or OSS For User, you must add Apsara File Storage NAS (NAS) files systems or Object Storage Service (OSS) buckets as DBS storage pools in advance. For more information, see Add or remove a storage pool.

      Storage Pool

      The storage pool in which data backups are stored. You must select a storage pool that resides within the same region as the data source.

      Note

      You cannot modify this parameter after the backup policy template is created.

      Retention Period

      The duration for which full backups are retained. Valid values: 1 Week, 1 Month, 1 Quarter, 6 Months, 1 Year, 2 Years, 3 Years, 4 Years, 5 Years, 6 Years, 7 Years, 8 Years, 9 Years, and 10 Years. Default value: 2 Years.

      Encryption Method

      Specifies whether and how to encrypt backups. Default value: Built-in encryption. Valid values:

      • Built-in Encryption (default): Backups are encrypted.

        The server-side encryption feature is used in OSS. When you upload an object to OSS, OSS encrypts and stores the object. When you download the encrypted object from OSS, OSS decrypts the object and returns the decrypted object to you. For more information, see Server-side encryption.

      • Non-encrypted: Backups are not encrypted.

What to do next

When you back up the database, select the created backup policy template to apply the policy to the backup schedule. For more information, see Back up databases.

Related operations

Modify a backup policy

  1. Log on to the DBS console. In the left-side navigation pane, click Backup Strategies. In the top navigation bar of the Backup Strategy List page, select a region.

  2. On the Backup Strategy List page, find the backup policy that you want to manage and click Modify in the Actions column.

    image.png

    Note
    • Some parameters cannot be modified. The parameters displayed in the console shall prevail.

    • If you modify a backup policy template, only the backup schedules created after the modification will be affected. You can go to the details page of the backup policy to view the backup schedules that are associated with the backup policy.

    • If you want to modify a backup policy of a backup schedule that is running, you must separately modify the backup policy. For more information, see Modify the backup policy of a backup schedule.

Clone a backup policy

You can clone a backup policy to quickly create backup policies with similar or identical configurations. This helps you improve work efficiency and ensure backup security. To clone a backup policy, perform the following steps:

  1. Log on to the DBS console. In the left-side navigation pane, click Backup Strategies. In the top navigation bar of the Backup Strategy List page, select a region.

  2. On the Backup Strategy List page, find the backup policy that you want to manage and click Clone in the Actions column.

    image.png

Delete a backup policy

  1. Log on to the DBS console. In the left-side navigation pane, click Backup Strategies. In the top navigation bar of the Backup Strategy List page, select a region.

  2. On the Backup Strategy List page, find the backup policy that you want to manage and click Delete in the Actions column.

    image.png

    Note

    If the backup policy template is associated with a backup schedule, you cannot delete the backup policy template.

FAQ

Q: What is the relationship between the backup time of a backup policy and the backup time configured for a backup schedule in DBS? Does the backup time of a backup policy affect the backup time configured for a backup schedule in DBS?

A: A backup policy can be used as a template to create a backup schedule. After you configure a backup policy, you can create multiple backup schedules on the Data Source page based on the backup policy. You can use the backup policy to back up multiple databases at a time. In this scenario, you must use the backup policy together with data sources. For more information about data sources, see Supported data sources. You can modify the backup time of a backup schedule that is created based on the backup policy without being affected by the backup policy.

You can also create a backup schedule without using the backup policy. In this case, the backup schedule is not affected by the backup policy.