Updated on 2026-09-18 GMT+08:00

Managing CDM Jobs

Scenario

This section describes how to manage CDM table/file migration jobs in batches. The following operations are supported:
  • Managing jobs by group
  • Running jobs in batches
  • Deleting jobs in batches
  • Exporting jobs in batches
  • Importing jobs in batches

Batch job export and import:

  • Table/file migration jobs and links can be exported and imported in batches.
  • CDM allows you to export the configuration information of jobs and links to a JSON file and import the file to other CDM clusters. This function applies to the following scenarios:
    • The exported JSON file does not contain link passwords, which are replaced with placeholders. After importing the file, you must supplement the passwords before using the links.
    • If you import a file from a local path, the file cannot be larger than 1 MB. If a file is larger than 1 MB, import it through OBS.
    • If a job with the same name as a job to be imported already exists in the target cluster, a conflict message will be displayed, and the existing job will not be overwritten.
    • If a link with the same name as a link to be imported already exists in the target cluster, the existing link will be overwritten.
    • Cross-cluster migration: You can migrate jobs and link configurations between CDM clusters. For example, you can migrate jobs and link configurations from a cluster of an earlier version to a cluster of a later version.
    • Job backup: You can stop or delete CDM clusters to reduce costs. In this case, you can export the job scripts in batches and save them, and create a cluster and import the job scripts if necessary.
    • Batch job creation: You can manually create a job and export the job configuration file in JSON format. Copy the content in the JSON file to the same file or new files, and then import the file/files to CDM to create jobs in batches.

Procedure

  1. Log in to the management console and choose Service List > Cloud Data Migration. In the left navigation pane, choose Cluster Management. Locate the target cluster and click Job Management.
  2. Click Table/File Migration. The job list is displayed. You can perform the following batch operations:

    • Manage jobs by group.

      CDM allows users to add, modify, search for, and delete job groups. When a group is deleted, all jobs in the group are deleted.

      When creating a job, if jobs have been assigned to different groups, you can display, start, or export jobs by group.

      Starting jobs by group will run all jobs in the group. If user isolation is enabled, starting jobs by group will still run all jobs in the group even if other IAM users in the a Huawei Cloud account cannot view the jobs in the group. Therefore, you are not advised to start jobs by group in user isolation scenarios.

    • Run jobs in batches.

      After selecting one or more jobs, click Run to start these jobs in batches.

    • Delete jobs in batches.

      After selecting one or more jobs, click Delete to delete these jobs in batches.

    • Export jobs in batches.

      Click Export.

      Figure 1 Export
      • All jobs and links: Export all jobs and links at a time.
      • All jobs: Export all jobs at a time.
      • All links: Export all links at a time.
      • Jobs by name: Select the jobs to export and click OK.
      • All jobs by groups: Select the group to export and click OK.

      Exported jobs are stored in JSON files, which can be used as backups or imported to other clusters.

      For security purposes, no link password is exported when jobs are exported. All passwords are replaced by Add password here.

    • Import jobs in batches.
      Click Import and select the import format (text file or JSON).
      • By JSON string: Job files to be imported must be in JSON format and the file size cannot exceed 1 MB. If the job files to be imported are exported from CDM, edit the JSON files before importing them to CDM. Replace Add password here with the correct link passwords.
      • By text file: This mode can be used when the local JSON files cannot be uploaded properly. Paste the JSON strings for the jobs into the text box.
      • Importing jobs
        • Job name conflict: If a job with the same name as the job to be imported already exists in the target cluster, a conflict message will be displayed, and the existing job will not be overwritten. To overwrite the existing job, manually delete it from the target cluster and then import the target job again.
        • Links on which jobs depend: If the exported file contains links (for example, All jobs and links was selected during the export), the links will also be imported when you import jobs. If a link with the same name as a link to be imported already exists in the target cluster, the existing link will be overwritten. If the exported file does not contain links (Jobs by name was selected during the export), ensure that links with the same names as the source links already exist in the target cluster. Otherwise, the imported jobs will not function properly.
        • Entire database migration jobs: The import and export operations on entire database migration jobs are the same as those for table/file migration jobs.
      • Importing links
        • Overwriting existing links with the same names: If a link with the same name already exists in the target cluster, the existing link will be overwritten during the import. All configuration information (including link parameters and passwords) of the existing link will be replaced. As the password in the exported file is replaced by placeholders, the password of the overwritten link will be replaced by placeholders. As a result, the link becomes unavailable. Before importing a file that contains links, ensure that you use the password completion function to enter the correct passwords of the links, or manually restore the passwords of the links after the import.
        • Completing passwords: The passwords of the links to be imported are placeholders. You must enter the correct passwords for the links so that they can run properly. You can also manually change the passwords on the Links page after the import is complete.
      • Constraints on the file size
        • If you import a file from a local path, the file cannot be larger than 1 MB. If an exported file is larger than 1 MB, import it using OBS.
        • If you import a file by pasting text, the text content cannot be larger than 1 MB.
        • If you import a file using OBS, there is no limit on the file size.
      • Other notes
        • The imported and exported JSON files can be used across CDM versions. However, if the configuration of a job contains function parameters specific to a later version, they may not be identified when the job is imported to a cluster of an earlier version.
        • Importing a job does not start the job. After the import is complete, you need to manually start the job.
        • If the data source (such as the source database and destination database) referenced in the configuration of an imported link does not exist in the target cluster, you need to create the corresponding data source in the destination cluster. Otherwise, a connection error will occur during job execution.
        • An export operation does not export the historical execution records and scheduling configurations of the job.