Data Management Service (DMS) integrates with Database Backup (DBS), 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. 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 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 methods and items.

Create a DBS backup task

  1. In the top navigation bar, choose Data Factory > Task Orchestration. The Home tab of the Task Orchestration page appears.
  2. Click the Develop Space icon on the left-side navigation submenu.
    Develop Space icon
  3. On the Develop Space tab, click New Task Flow in the center. In the New Task Flow dialog box, enter relevant information in the Task Flow Name and Description fields and click OK. The task orchestration tab of the created task flow appears.
  4. In the navigation tree, find the DBS Backup task node and drag the task node to the canvas.
    DBS Backup task node
  5. 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.
  6. The DBS backup task is created. Click Try Run in the upper-left corner to test the DBS backup task.
    Try Run button
  7. After the test is run, click the blank area on the canvas. The Scheduling tab appears on the right. Turn on the switch at the top of the Scheduling tab, complete the configurations, and then click Save.
    Note When you configure scheduling properties for a task, you can set the Scheduling Cycle parameter as needed. Valid values are Day, Week, and Month. In this example, the DBS backup task is run at 05:00 every weekday.

Create a DBS restore task

  1. In the top navigation bar, choose Data Factory > Task Orchestration. The Home tab of the Task Orchestration page appears.
  2. Click the Develop Space icon on the left-side navigation submenu.
    Develop Space icon
  3. On the Develop Space tab, click New Task Flow in the center. In the New Task Flow dialog box, enter relevant information in the Task Flow Name and Description fields and click OK. The task orchestration tab of the created task flow appears.
  4. In the navigation tree, find the DBS Recovery task node and drag the task node to the canvas.
    DBS Recovery task node
  5. 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 as required.
      Content tab
      Section Parameter Description
      Database Data sources The source database that you backed up by running a DBS backup task and want to restore.
      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 time point that you want to restore the source database to. You can use a variable to set this parameter. The system will automatically select the backup dataset that was backed up at a time point that is closest to the specified time point.
      Select the table that needs to be recovered One or more tables in the source database that you want to restore.
      Rename Policy The method that the system 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 that is to be created by the restore task. Assume that a table to be restored in the source database and an existing table in the destination database have the same name: job_info. The system will rename 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.
  6. The DBS restore task is created. Click Try Run in the upper-left corner to test the DBS restore task.
  7. After the test is run, click the blank area on the canvas. The Scheduling tab appears on the right. Turn on the switch at the top of the Scheduling tab, complete the configurations, and then click Save.
    Note When you configure scheduling properties for a task, you can set the Scheduling Cycle parameter as needed. Valid values are Day, Week, and Month.