Help Center> Cloud Data Migration> User Guide> Job Configuration Management

Job Configuration Management

On the Configuration Management tab page, you can perform the following operations:

Automatic Backup and Restoration of CDM Jobs

  • Prerequisites

    You have created the Link to OBS.

  • Automatic backup

    On the Job Management page, click the Configuration Management tab and configure the parameters of Scheduled Backup.

    Table 1 Parameters for Scheduled Backup

    Parameter

    Description

    Example Value

    Scheduled Backup

    Whether to enable automatic backup. This function is used to back up jobs but not links. If this function is enabled, you need to configure Backup Policy, Backup Cycle, OBS Link for Writing Backups, OBS Bucket, and Backup Data Directory.

    Enable

    Backup Policy

    • All jobs: CDM backs up all table/file migration jobs and entire DB migration jobs regardless of the job statuses. However, historical jobs are not backed up.
    • All jobs by groups: You select one or more job groups to back up.

    All jobs

    Backup Cycle

    Select the backup cycle.

    • Day: The backup is performed daily at 00:00:00.
    • Week: The backup is performed at 00:00:00 every Monday.
    • Month: The backup is performed at 00:00:00 on the first day of each month.

    Day

    OBS Link for Writing Backups

    CDM uses the link to back up jobs to OBS. You must create an OBS link on the Link Management tab page in advance.

    obslink

    OBS Bucket

    OBS bucket where backup files are stored

    cdm

    Backup Data Directory

    Directory where backup files are stored

    /cdm-bk/

    Environment Variable

    Global control parameter. For example, if xxx=123 exists, you can use ${xxx} to replace 123 in jobs.

    AAA=333

    Maximum Concurrent Extractors

    It is user-defined. Do not set the same scheduled time for different jobs. Instead, set different times to avoid exceptions.

    5

  • Restoring jobs

    If automatic backup has been performed, the backup list is displayed on the Configuration Management tab page. The OBS buckets where the backup files reside, backup paths, and backup time are displayed.

    You can click Restore Backup in the Operation column of the backup list to restore the CDM jobs.

Global Variables of CDM Job Parameters

When creating a migration job on CDM, the parameter (such as the OBS bucket name or file path) that can be manually configured, a field in a parameter, or a character in a field can be configured as a global variable, so that you can change parameter values in batches, or batch replace certain characters after jobs are exported or imported.

The following describes how to batch replace the OBS bucket name in a migration job.

  1. On the Job Management page, click the Configuration Management tab and configure environment variables.
    buket_1=A
    buket_2=B

    Variable buket_1 indicates bucket A, and variable buket_2 indicates bucket B.

  2. On the page for creating a CDM migration job, migrate data from bucket A to bucket B.

    Set the source bucket name to ${buket_1} and destination bucket name to ${buket_2}.

    Figure 1 Setting the bucket names to environment variables
  3. If you want to migrate data from bucket C to bucket D, you do not need to change the job parameters. You only need to change the environment variables on the Configuration Management tab page as follows:
    buket_1=C
    buket_2=D