Jump to: navigation, search

Pausing, Resuming and Canceling Migration

In UCS 9.1 you can:

  • Pause a migration job gracefully, which preserves its context, and resumes it later from the point of the interruption. This enables you to respond to external circumstances, like network issues, production constraints, and so on.
  • Cancel a migration job completely, which deletes its context. No resumption is possible.

Pausing and resuming

There are two steps:

  1. Pausing the migration job—this uses a pause command and the job ID of a running migration job.
  2. Resuming the migration job—this uses a submit command and a RESUME_ID parameter.

Pausing

ucs-job.bat pause
-p ID <job id> 
-p PATH_CURL <path to curl>
-p GDPS_HOST <ip or host name> 
-p GDPS_PORT <gdps port>

Resuming

Sequence

  1. When the migration job is started, an initial job ID is generated. In the example below this is: cba4ef8f-2072-4 e4a-9d8c-c2950823a8fa.
  2. ucs-job.bat submit -p PACKAGE_NAME MigrationPosgre...
     
    Job Id: cba4ef8f-2072-4e4a-9d8c-c2950823a8fa 
    job submitted at Thu 07/20/2017 11:42:38
    Please wait. Migrating interactions
    processed:0 errors:0 exceptions:0 success:0 total:0
    processed:0 errors:0 exceptions:0 success:0 total:0
    processed:0 errors:0 exceptions:0 success:0 total:0
    processed:0 errors:0 exceptions:0 success:0 total:0
    processed:0 errors:0 exceptions:0 success:0 total:10000
    processed:0 errors:0 exceptions:0 success:0 total:10000
    processed:0 errors:0 exceptions:0 success:0 total:10000
  3. To pause the job, use the initial job Id.
  4. To resume the job, use the initial job Id in the RESUME_ID parameter.
  5. When the job is resumed for the first time, a second job iD is generated. In the example below, this is: 151f6ed6-e86d-4e0d-bbcf-d2138195ff77
  6. ucs-job.bat submit -p PACKAGE_NAME MigrationPosgre - p RESUME_ID cba4ef8f-2072-4e4a-9d8c-c2950823a8fa...
     
    Job Id: 151f6ed6-e86d-4e0d-bbcf-d2138195ff77
    job submitted at Thu 07/20/2017 11:26:26
    Please wait. Migrating interactions
    processed:1518 errors:0 exceptions:0 success:1518 total:10000
    processed:1518 errors:0 exceptions:0 success:1518 total:10000
  7. To pause the migration a second or subsequent time, you must use the newly generated job ID.
  8. To resume the migration a second or subsequent time, you must use initial job iD in the RESUME_ID parameter.

Parameters List

Parameter Mandatory Notes
-p PACKAGE_NAME Yes Name of the uploaded package in GDPS.
-p PATH_CURL No Directory where curl is installed. The default value is /usr/bin. If path contains spaces, surround it with double quotes—for example/; -p PATH_CURL "C:\Program Files\tools".
-p JOB_NAME Yes Name of the job to run within the package.
-p UCS8_PROTOCOL Yes Supported values:
  • sqlserver
  • oracle
  • db2
  • postgresql
-p UCS8_DBNAME Yes The UCS 8.5 database name.
-p UCS8_HOST Yes UCS 8.5 database host name or IP address. Set to localhost by default.
-p UCS8_PORT Yes UCS 8.5 database TCP port.
-p UCS8_USER Yes UCS 8.5 database user name.
-p UCS8_PWD No UCS 8.5 database password.
-p UCS9_HOST Yes hostucs9
-p UCS9_PORT Yes 7050
-p START_DATE_FROM No The start of the date range for exporting items. Format is yyyy-MM-dd HH:mm:ss.SSS and must be surrounded with quotation marks. This start date is included in the selection. Example to migrate only objects created in 2017:

-p START_DATE_FROM "2017-01-01 00:00:00.000" -p START_DATE_TO "2018-01-01 00:00:00.000"

-p START_DATE_TO No The end of the date range for exporting items. Format is yyyy-MM-dd HH:mm:ss.SSS and must be surrounded with quotation marks. This end date is excluded from the selection. Example to migrate only objects created in 2017:

-p START_DATE_FROM "2017-01-01 00:00:00.000" -p START_DATE_TO "2018-01-01 00:00:00.000"

-p RESUME_ID No Specify a paused job ID to resume its processing where it left off. If the specified ID does not exist in GDPS, an error is returned.
-p DURATION No Specify a time window in minutes for running a resumed migration. When the time elapses, migration stops gracefully and may be resumed later by using RESUME_ID parameter. The value must be greater than 0.
-p SPARK_PARTITIONS No. The number of Spark partitions used for processing data.
-p GDPS_HOST Yes IP or host name of the GDPS server.
-p GDPS_PORT Yes The TCP port for GDPS.

Example

-p PACKAGE_NAME demo \
-p PATH_CURL /usr/bin \
-p JOB_NAME MigrateUcsInteractions \
-p UCS8_PROTOCOL postgresql \
-p UCS8_DBNAME ucs_35_05_db \
-p UCS8_HOST demo.com \
-p UCS8_PORT 5432 \
-p UCS8_USER sa \
-p UCS8_PWD sa \
-p UCS9_HOST hostucs9
-p UCS9_PORT 7050
-p SPARK_PARTITIONS 50 \
-p GDPS_HOST localhost \
-p GDPS_PORT 17009 \
-p RESUME_ID 3fc37e79-c1fc-4b57-a22a-636fb8f0ff35 \
-p DURATION 120

Multiple Resumptions

When a migration job is started, an initial job ID is generated. When a job is paused and resumed the first time, you use the job ID to both pause and resume the job.

But when a job is paused and resumed a second time, a second job ID is generated for the resumed job. To stop the job a second time, you use the second job ID. But to resume it a second (or subsequent) time, you must re-use the initial job ID.


Canceling a migration job

Any migration job already submitted can be canceled by using the following ucs-job script syntax:

ucs-job.bat cancel 
-p ID <job id> 
-p PATH_CURL <path to curl>
-p GDPS_HOST <ip or host name> 
-p GDPS_PORT <gdps port>

Example

ucs-job.bat cancel 
-p ID 3fc37e79-c1fc-4b57-a22a-636fb8f0ff35
-p PATH_CURL C:\Dev
-p GDPS_HOST 192.168.99.100
-p GDPS_PORT 17009

Notes

  • Canceling the job does not take place instantly—the time it takes depends on the size of the job.
  • Using the RESUME_ID with the ID of a canceled job will restart migration from the very beginning.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 18 May 2018, at 07:59.