Data Management Service (DMS) integrates with Database Backup (DBS), which is a cost-effective backup service. You can use the DBS Backup and DBS Recovery task nodes that are provided by the task orchestration feature of DMS to periodically back up data and restore data.

Prerequisites

  • DMS is activated.
  • Database instances are registered with DMS. For more information, see Register an ApsaraDB instance.
  • You are a DMS administrator, a database administrator (DBA), or the owner of an Alibaba Cloud account. For more information about how to apply for or manage permissions, see Manage permissions.

Background information

DBS is a cost-effective backup service for continuous data protection. It offers a comprehensive solution for data backup and restoration. It supports backing up incremental data in real time and restoring a database within seconds. In the era of big data, data is regarded as a core asset of an enterprise and needs to be backed up in a proper and secure manner. DMS allows you to manage data in a secure manner and DBS allows you to back up data to Object Storage Service (OSS) at low costs. The combination of DMS and DBS will prove to be the best solution in data backup scenarios.

In DMS, DBS-based data backup is billed based on the pay-as-you-go billing method. Costs will be deducted from the balance of your Alibaba Cloud account. For more information, see Billing overview.

Create a DBS backup task

  1. Log on to the DMS console V5.0.
    Note To switch to the previous version of the DMS console, click the 5租户头像 icon in the lower-right corner of the page. For more information, see Switch to the previous version of the DMS console.
  2. In the top navigation bar, click DTS. In the left-side navigation pane, choose Data Development > Task Orchestration(Old).
    Note If you are using the previous version of the DMS console, move the pointer over the More icon in the top navigation bar and choose Data Factory > Task Orchestration.
  3. Click the Develop Space icon on the left-side navigation submenu.
    Develop Space icon
  4. On the Develop Space tab, click New Task Flow in the center. In the New Task Flow dialog box, set the Task Flow Name and Description parameters and click OK. The task orchestration tab of the created task flow appears.
  5. From the left-side task node list, drag the DBS Backup task node to the canvas.
    DBS Backup task node
  6. Configure the DBS Backup task node.
    1. Click the DBS Backup task node on the canvas. The Content tab appears on the right.
    2. On the Content tab, select a database from the Source of data drop-down list.
    3. Click Please select a table that needs to be backed up in the Table section. In the Table Selection dialog box, select one or more tables to be backed up and click OK.
      Table Selection dialog box
    4. Click Save in the lower part of the Content tab.
  7. Click Try Run in the upper-left corner of the canvas to test the DBS restore task.
    Try Run
  8. After the test is run, click the blank area on the canvas. The Scheduling Settings tab appears on the right. On the tab, turn on Enable Scheduling, complete the configurations, and then click Save.
    Note You can schedule the task flow to run as required. For example, you can schedule the task flow to run by month, week, or day. In this example, the DBS backup task is scheduled to be run at 05:00 every business day. Scheduling Settings tab

Create a DBS restore task

  1. Log on to the DMS console V5.0.
    Note To switch to the previous version of the DMS console, click the 5租户头像 icon in the lower-right corner of the page. For more information, see Switch to the previous version of the DMS console.
  2. In the top navigation bar, click DTS. In the left-side navigation pane, choose Data Development > Task Orchestration(Old).
    Note If you are using the previous version of the DMS console, move the pointer over the More icon in the top navigation bar and choose Data Factory > Task Orchestration.
  3. Click the Develop Space icon on the left-side navigation submenu.
    Develop Space icon
  4. On the Develop Space tab, click New Task Flow in the center. In the New Task Flow dialog box, set the Task Flow Name and Description parameters and click OK. The task orchestration tab of the created task flow appears.
  5. From the left-side task node list, drag the DBS Recovery task node to the canvas.
    DBS Recovery task node
  6. Configure the DBS Recovery task node.
    1. Click the DBS Recovery task node on the canvas. The Content tab appears on the right.
    2. On the Content tab, set the parameters that are described in the following table.
      Content tab
      Section Parameter Description
      Database Data sources The source database that you want to restore. You have backed up the source database by running a DBS backup task.
      Target database The destination database to which you want to restore the source database. The destination database must be of the same type as the source database.
      Basic configuration Recovery point in time The point in time to which you want to restore the source database. You can use a variable to set this parameter. DMS automatically selects the backup dataset that was backed up at a point in time that is closest to the specified point in time.
      Select the table that needs to be recovered All or specific tables in the source database that you want to restore.
      Rename Policy The method that DMS adopts if a table to be restored in the source database has the same name as an existing table in the destination database.
      Note Valid values:
      • Error: terminates the current restore task.
      • Rename: renames the new table to be created by the restore task. For example, a table to be restored in the source database and an existing table in the destination database have the same name: job_info. Then, DMS renames the new table, which is restored from the table in the source database, in the following format: job_info_dbs_<ID of the restore task>_</Timestamp>.
    3. Click Save.
  7. Click Try Run in the upper-left corner of the canvas to test the DBS restore task.
  8. After the test is run, click the blank area on the canvas. The Scheduling Settings tab appears on the right. On the tab, turn on Enable Scheduling, complete the configurations, and then click Save.
    Note You can schedule the task flow to run as required. For example, you can schedule the task flow to run by month, week, or day.