Database Backup (DBS) allows you to archive backup data in the cloud to your data center, such as to a self-managed Network Attached Storage (NAS) file system, on a regular basis.

Prerequisites

The storage pool feature is in public preview. To use this feature, scan the following QR code to join the DingTalk group whose ID is 35585947.

QR code to join the DingTalk group for DBS customers

Step 1: Add a database

Add the database that you want to back up to DBS. For more information, see Add a data source.

Step 2: Add a NAS file system as a storage pool

  1. Log on to the DBS console. In the left-side navigation pane, click Storage Pool. On the Storage Pool page, click Add storage pool.
  2. Set the required parameters to add a storage pool.

    In this example, a self-managed NAS file system is added as a storage pool that uses the Network File System (NFS) protocol and is connected to DBS over the Internet.

    Parameter Description
    Storage type The type of the storage pool. In this example, select NAS.
    Protocol Type The protocol that is used by the storage pool. In this example, select NFS.
    Connection Method The method that is used to connect to the storage pool. In this example, select Internet. The self-managed NAS file system is connected to DBS over the Internet.
    Note If you set the Connection Method parameter to Internet, you are not charged for traffic, but the connection may be exposed to security risks. To improve security, we recommend that you use a virtual private cloud (VPC).
    Storage pool name The name of the storage pool.
    NAS Version The version of the NAS file system. Only NFSv4 is supported. For more information, see Comparison of Network File System version 4 to Prior Versions.
    Region The region where the storage pool resides. Select a region that is close to your NAS file system.
    Address The public endpoint of the self-managed NAS file system.
    Port Number The port number that is used to connect to the self-managed NAS file system.
    NAS Server Path Optional. The mount target of the self-managed NAS file system.
    Storage Capacity The storage capacity of the storage pool. Unit: GB.
  3. Click Completed.
    The storage pool is added.

Step 3: Create a backup policy that uses multiple levels of storage pools

A backup policy that uses multiple levels of storage pools consists of a backup policy for a level-1 storage pool and a dump policy for a level-2 storage pool:
  • You can use a backup policy for a level-1 storage pool to store the backups of a data source in the level-1 storage pool. For example, you can back up a database every day or three times a week.
  • You can use a dump policy for a level-2 storage pool to dump the backups stored in the level-1 storage pool to the level-2 storage pool. For example, you can specify the interval at which backups are dumped and the objects to be dumped.
In this example, the following backup policy that uses multiple levels of storage pools is created:
  • Backup policy for a level-1 storage pool: performs a full backup every day and retains the backup data in the built-in storage space of DBS for seven days. This ensures disaster recovery.
  • Dump policy for a level-2 storage pool: dumps the latest backup data to an on-premises NAS file system on the first day of each month and retains the backup data for seven years. This implements data archiving.
  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 in the upper-left corner of the page.
  3. On the Create Policy Template page, configure the backup policy name, backup mode, and backup policy for the level-1 storage pool.
    1. Set a name for the backup policy.
    2. Select Logical Backup.
    3. Click Modify to the right of backup policy. In the dialog box that appears, set the parameters for the backup policy. Then, click OK.
      Table 1. Parameter description
      Parameter Description
      Full Backup Method The method that is used to perform full backups. In this example, select Periodic Backup. Full backups are performed on a specific periodic basis.
      Full backup frequency

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

      Full Backup Cycle The days of the week when full backups are performed. In this example, select all days of a week. A full backup is performed every day.
      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 finished at the start time of the next full backup, DBS skips the next full backup.
    4. Click Modify to the right of Level-1 Storage Pool (Backup). In the dialog box that appears, set the parameters for a level-1 storage pool. Then, click OK.
      Table 2. Parameter description
      Parameter Description
      Storage type The type of the storage that is used by data backups. In this example, select DBS Storage. Data backups are stored in the built-in storage space of DBS.
      Storage Pool

      The storage pool in which database backups are stored. You must select a storage pool that resides within the same region as the data source. In this example, select the built-in storage space of DBS that resides in the China (Hangzhou) region.

      Retention Period The duration for which data backups are retained. In this example, select 1 Week. Data backups are retained in DBS for one week.
      Encryption method Specifies whether and how to encrypt backups. Valid values:
      • Built-in encryption: Backups are encrypted.

        The server-side encryption feature of OSS is used. When you upload an object to a bucket for which server-side encryption is enabled, OSS encrypts the object and stores the encrypted 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.

      • Unencrypted: Backups are not encrypted.
  4. Move the pointer over the Add a level-2 storage pool icon and click Dump.
    1. Click Modify to the right of Dump Policy. In the dialog box that appears, set the parameters for a dump policy. Then, click OK.
      Table 3. Parameter description
      Parameter Description
      Full Dump Method The method that is used to dump backups. Valid values:
      • Periodic Backup: DBS dumps the latest full backup set that is not dumped to a level-2 storage pool on a specific periodic basis. If no qualified backup sets exist when the specific point in time is reached, DBS continues to monitor the creation of backup sets and performs a dump as soon as a backup set is created.

        In this example, configure DBS to perform a full backup to the level-1 storage pool every day and a full dump to the level-2 storage pool on the first day of each month. In this case, DBS dumps only the latest full backup set to the level-2 storage pool on the first day of each month.

      • Event Trigger: When a full or incremental backup is complete in the level-1 storage pool, DBS immediately dumps the backup data to a level-2 storage pool.
      Full Dump Frequency The interval at which backups are dumped.
      • If you set the Full Dump Method parameter to Periodic Backup, the following values are supported:
        • Every Week: You can select one or more days of a week. This is the default value.
        • Every Month: You can select one or more days from the 1st to the 28th day of a month.
        • Every Year: You can select a specific day of a year. Example: January 1. You cannot select more than one day.
      • If you set the Full Dump Method parameter to Event Trigger, this parameter is set to Event Trigger by default.
      In this example, select the first day of each month.
      Full Dump Cycle The days of the week when full backups are dumped.
      Full Dump Start At The start time of each full dump.
      Incremental Dump Specifies whether to dump incremental backups. If you enable this feature, DBS dumps the incremental backups from the level-1 storage pool to the level-2 storage pools.
    2. Click Modify to the right of Level-2 Storage Pool (Dump). In the dialog box that appears, set the parameters for a level-2 storage pool. Then, click OK.
      Table 4. Parameter description
      Parameter Description
      Storage type The type of the storage that is used by data backups. In this example, select NAS.
      Storage Pool The storage pool to which backups are dumped. In this example, select the self-managed NAS file system that you added as a storage pool in Step 2.
      Retention Period The duration for which dumped backups are retained. In this example, select 7 Years.
      Storage Method Specifies whether and how to encrypt backups. Valid values:
      • Built-in encryption: Backups are encrypted.

        The server-side encryption feature of OSS is used. When you upload an object to a bucket for which server-side encryption is enabled, OSS encrypts the object and stores the encrypted 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.

      • Unencrypted: Backups are not encrypted.
  5. Optional:Repeat Step 4 to create multiple level-2 storage pools.
  6. Click OK.
    A backup policy that uses multiple levels of storage pools is created.

Step 4: Back up the database

On the Data Source page, create a backup schedule for the database that you want to back up. Select the backup policy that you created in Step 3. For more information, see Back up one or more databases.

When the status of the backup schedule changes to Running, the configuration is complete. Then, DBS runs the backup and dump tasks based on the backup schedule.