A backup policy template in Database Backup (DBS) 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.

Procedure

  1. Log on to the DBS console. In the left-side navigation pane, click Backup Strategies. In the upper part of the page that appears, select a region.
  2. Click Add backup strategy.
  3. On the Create Policy Template page, create a backup policy template.
    1. Specify a name for the backup policy template.
    2. Select Logical Backup or Physical Backup.
      Note
      • 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.

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

    3. 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.
      ParameterDescription
      Full Backup MethodThe method that is used to perform full backups. Valid values:
      • Periodic Backup: performs full backups on a specific periodic basis.
        Note If you set the Full Backup Method parameter to Periodic Backup, you must set the Full backup frequency parameter.
      • 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 displayed 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 data 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. If you set the interval to 10 minutes, DBS performs an incremental backup every 10 minutes.

      Note
      • This parameter is displayed only if you select Physical Backup.
      • If you select Logical Backup and enable the incremental backup feature for databases such as MySQL databases, incremental backups are performed in real time.
    4. 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.
      ParameterDescription
      Storage TypeThe type of the storage that you want to use. Valid values: DBS Storage, NAS, and OSS For User.
      Note
      • You can back up data to Network Attached Storage (NAS) file systems or Object Storage Service (OSS) buckets only if you use the logical backup method and have joined the public preview.OSS For User
      • 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 NAS files systems or OSS buckets as DBS storage pools in advance.
      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 MethodSpecifies whether and how to encrypt backups. Default value: Built-in encryption. Valid values:
      • Built-in Encryption: 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.
  4. Click OK.
    A backup policy template is created.

What to do next

  • Back up a database: Select the created backup policy template when you create a backup schedule to back up the database. For more information, see Back up databases.

  • View, modify, clone, or delete the created backup policy template on the Backup strategy list page.
    • After you modify the backup policy template, you can apply it only to the backup schedules that are created after the modification. Backup schedules that are created before the backup policy template is modified are not affected.

      You can modify the backup policy configured for a backup schedule in the Running state. For more information, see Modify the backup policy of a backup schedule.

    • 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. 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.