H Zero Downtime Migration ZDMCLI Command Reference
ZDMCLI is the command line interface for Zero Downtime Migration migration operations.
To run ZDMCLI commands, go to the /bin
directory
in the Zero Downtime Migration software home and
enter one of the commands listed in the topics
below. For example:
zdmuser> $ZDM_HOME/bin/zdmcli migrate database
To list help pages for any ZDMCLI command use the
-help
option. The following
command lists the help for all of the ZDMCLI
commands.
zdmuser> $ZDM_HOME/bin/zdmcli -help
To get the current release information for your Zero Downtime
Migration software, run ZDMCLI with the
-build
option.
zdmuser> $ZDM_HOME/bin/zdmcli -build
The following topics describe the Zero Downtime Migration ZDMCLI command usage and options.
abort job
Terminates the specified job, if running.
Syntax
$ZDM_HOME/bin/zdmcli abort job
-jobid job_id
Options
Table H-1 ZDMCLI abort job Options
Option | Description |
---|---|
-jobid job_id | Unique job ID value (integer) for the scheduled job. The job ID is assigned when the job is scheduled. |
add imagetype
Configures a new image type of the specified name and its associated user actions.
Syntax
$ZDM_HOME/bin/zdmcli add imagetype
-imagetype image_type
-basetype CUSTOM_PLUGIN
[-useractions user_action_list]
Options
Table H-2 ZDMCLI add imagetype Options
Option | Description |
---|---|
-imagetype image_type |
Name of the image type to be created |
-basetype CUSTOM_PLUGIN |
The base image type for which the image type is created. Note that |
-useractions user_action_list |
Comma-separated list of user action names |
add useraction
Configures a new user action of the specified name with its associated script and action file.
Syntax
$ZDM_HOME/bin/zdmcli add useraction
-useraction user_action_name
-actionscript script_name
[-actionfile file_name]
{-pre | -post}
-optype MIGRATE_DATABASE
[-phase operation_phase]
[-onerror {ABORT | CONTINUE}]
[-runscope
{ONENODE |
ALLNODES |
AUTO}]
Options
Table H-3 ZDMCLI add useraction Options
Option | Description |
---|---|
-useraction user_action_name |
Name of the user action |
-actionscript script_name |
Script file to be run |
-actionfile file_name |
File associated with and needed by the user action |
-pre |
Runs the user action before the operation |
-post |
Runs the user action after the operation |
-optype MIGRATE_DATABASE |
Defines the operation for which the user action is configured as
|
-phase phase_of_operation |
Migration operation phase for which the user action is configured |
-onerror {ABORT | CONTINUE} |
The response if the user action encounters an error during execution |
-runscope {ONENODE | ALLNODES | AUTO} |
The servers on which the user action is run. Specify AUTO to choose the run scope based on the other command options. |
migrate database
Performs a migration of a database to the Oracle Cloud.
Syntax
$ZDM_HOME/bin/zdmcli migrate database
-rsp zdm_template_path
-sourcenode source_host_name
[{-srcroot |
-srccred cred_name |
-srcuser user_name |
{-srcsudouser sudo_user_name -srcsudopath sudo_binary_path} |
{-srcauth plugin_name
[-srcarg1 name1:value1
[-srcarg2 name2:value2...]]}}]
{-sourcedb db_name |
-sourcesid source_oracle_sid}
-targetnode target_host_name
{-tgtroot |
-tgtcred cred_name |
-tgtuser user_name |
{-tgtsudouser sudo_user_name -tgtsudopath sudo_binary_path} |
{-tgtauth plugin_name
[-tgtarg1 name1:value1
[-tgtarg2 name2:value2...]]}}
[-eval]
-backupuser user_name
[-targethome target_home]
[-imagetype]
[-tdekeystorepasswd]
[-tdemasterkey]
[-sourcesyswallet sys_wallet_path]
[-osswallet oss_wallet_path]
[-tdekeystorewallet tde_wallet_path]
[-useractiondata user_action_data]
[-schedule {timer_value | NOW}]
[-pauseafter phase]
[-stopafter phase]
[-listphases]
[-ignoremissingpatches patch_name [,patch_name...]]
[-ignore {ALL | WARNING | PATCH_CHECK}]
[-advisor | [-ignoreadvisor | -skipadvisor]]
Options
Table H-4 ZDMCLI migrate database Options
Option | Description |
---|---|
-sourcedb db_name |
Name of the source database you want to migrate |
-sourcenode source_host_name |
Host on which the source database is running |
-targetnode target_host_name |
Target server to which the source database is migrated |
-targethome target_home |
Location of the target database |
-imagetype image_type |
Name of the user action imagetype |
-useractiondata user_action_data |
Value to be passed to useractiondata parameter of the user action script |
-rsp zdm_template_path |
Location of the Zero Downtime Migration response file |
-sourcesid source_oracle_sid |
|
-eval |
Evaluate the migration job without actually running the
|
-backupuser user_name |
Name of the user allowed to back up or restore the database |
-srcroot |
Directs Zero Downtime Migration to use |
-srccred cred_name |
Credential name with which to associate the user name and password credentials to access the source database server |
-srcuser user_name |
Name of the privileged user performing operations on the source database server |
-srcsudouser user_name |
Perform super user operations as |
-srcsudopath sudo_binary_path |
Location of |
-srcauth plug-in_name [plug-in_args] |
Use the
If you don't specify the sudo location the default (/usr/bin/sudo) is used by ZDM. |
-tgtroot |
Use |
-tgtcred cred_name |
Credential name with which to associate the user name and password credentials to access the target database server |
-tgtuser user_name |
Name of the user performing operations on the target database server |
-tgtsudouser user_name |
Perform super user operations as |
-tgtsudopath sudo_binary_path |
Location of |
-tgtauth plugin_name [plugin_args] |
Use the
If you don't specify the sudo location the default (/usr/bin/sudo) is used by ZDM. |
-tdekeystorepasswd |
Transparent Data Encryption (TDE) keystore password, required for password-based keystore or wallet |
-tdemasterkey |
Transparent Data Encryption (TDE) master encryption key |
-schedule timer_value |
Scheduled time to execute the operation, in ISO-8601 format. For example: 2016-12-21T19:13:17+05 |
-pauseafter phase |
Pause the job after running the specified phase |
-ignoremissingpatches |
Proceed with the migration even though the specified patches, which are present in the source path or working copy, might be missing from the destination path or working copy |
-ignore {ALL | WARNING | PATCH_CHECK} |
Ignore all checks or specific type of checks |
-listphases |
List the phases for this operation |
-sourcesyswallet sys_wallet_path |
Full path for the auto-login wallet file on the Zero Downtime
Migration host containing the |
-osswallet oss_wallet_path |
Full path for the auto-login wallet file on the Zero Downtime Migration host containing the credential for the Object Storage Service (OSS) backup user |
-tdekeystorewallet tde_wallet_path |
Full path for the auto-login wallet file on the Zero Downtime Migration host containing the Transparent Data Encryption (TDE) keystore password |
-advisor |
Only runs the minimum phases required for exclusively running Cloud Premigration Advisor Tool (CPAT) on the migration |
-ignoreadvisor |
Ignore Cloud Premigration Advisor Tool (CPAT) errors |
-skipadvisor |
When this option is included, Cloud Premigration
Advisor Tool (CPAT) does not run when |
-stopafter
phase |
Truncates the workflow by the specified phase, and upon completion of the specified phase, the migration job is marked with status completed. There is no option to resume the job beyond this phase. For example, if you intend to stop the workflow after Data Guard
setup, then specifying |
Examples
ZDMCLI migrate database
options for an Autonomous
Database migration:
zdmuser> $ZDM_HOME/bin/zdmcli migrate database -rsp file_path -sourcenode host
-srcauth zdmauth -srcarg1 user:username -srcarg2 identity_file:ssh_key_path
-srcarg3 sudo_location:sudo_path -eval [-advisor [-ignoreadvisor] | -skipadvisor]]
ZDMCLI migrate database
options for a co-managed
database migration:
zdmuser> $ZDM_HOME/bin/zdmcli migrate database -rsp file_path -sourcenode host
-srcauth zdmauth -srcarg1 user:username -srcarg2 identity_file:ssh_key_path
-srcarg3 sudo_location:sudo_path -targetnode host -tgtauth zdmauth
-tgtarg1 user:username -tgtarg2 identity_file:ssh_key_path
-tgtarg3 sudo_location:sudo_path -eval [-advisor [-ignoreadvisor] | -skipadvisor]]
modify useraction
Modifies the configuration of the user action with the specified name.
Syntax
$ZDM_HOME/bin/zdmcli modify useraction
-useraction user_action_name
[-actionscript script_name]
[-actionfile file_name]
[-pre | -post]
[-optype MIGRATE_DATABASE]
[-phase phase]
[-onerror {ABORT | CONTINUE}]
[-runscope
{ONENODE |
ALLNODES |
AUTO}]
Options
Table H-5 ZDMCLI modify useraction Options
Option | Description |
---|---|
-useraction user_action_name |
Name of the user action |
-actionscript script_name |
Script file to be run |
-actionfile file_name |
Accompanying file needed by the user action |
-pre |
Runs the user action before the operation |
-post |
Runs the user action after the operation |
-optype MIGRATE_DATABASE |
Defines the operation for which the user action is configured as
|
-onerror {ABORT | CONTINUE} |
Defines whether to stop or continue running if an error occurs while the user action is running |
-runscope {ONENODE | ALLNODES | AUTO} |
The servers where the user action will be run. Specify AUTO to choose the run scope based on the other command options. |
query job
Gets the current status of scheduled migration jobs.
Syntax
$ZDM_HOME/bin/zdmcli query job
[-jobid job_id
[-jobtype]]
[-sourcenode source_host_name
[-sourcedb db_name |
-sourcesid sid]]
[-targetnode target_host_name]
[-latest]
[-eval |
-migrate]
[-status
{SCHEDULED |
EXECUTING |
UNKNOWN |
TERMINATED |
FAILED |
SUCCEEDED |
PAUSED |
ABORTED}]
[-phase]
[-dbname database_name]
[-since timer_value]
[-upto timer_value]
[-brief]
[-statusonly]
Options
Table H-6 ZDMCLI query job Options
Option | Description |
---|---|
-jobid job_id |
Unique job ID value (integer) for the scheduled migration job The job ID is assigned when the migration job is scheduled. |
-job_type |
Returns the type of the scheduled job |
-sourcenode source_host_name |
Server on which the source database is running |
-sourcedb db_name |
Name of the source database to be migrated |
-sourcesid sid |
The |
-targetnode target_host_name |
Target server to which the database is migrated |
-latest |
Returns the most recent job that matches the given criteria |
-eval |
Returns evaluation jobs only |
-migrate |
Returns migration jobs only |
-status {SCHEDULED | EXECUTING | UNKNOWN | TERMINATED | FAILED |
SUCCEEDED | PAUSED | ABORTED} |
Returns jobs that match the specified job status |
-phase |
Returns the status of the given phase. If the phase supplied by the user is invalid, the query returns an error.
|
-dbname unique_db_name |
Specifies the database |
-since timer_value |
Date from which to get the jobs, in ISO-8601 format. For example: 2016-12-21T19:13:17+05 |
-upto timer_value |
Upper limit time to which to get the jobs, in ISO-8601 format. For example: 2016-12-21T19:13:17+05 |
-brief |
Returns job details summary only |
-statusonly |
Returns only the job status and current phase name |
Usage Notes
To identify if the current run is a resumption of a PAUSED migration job, a restart of a FAILED migration job, or a fresh start for a migration job, use the following options:
zdmcli query job -latest
gets the latest job without considering thejob_type
zdmcli query job -latest -migrate
gets the latest non-evaluation migration jobzdmcli query job -latest -eval
get the latest evaluation migration job
query useraction
Displays the configuration of a user action.
Syntax
$ZDM_HOME/bin/zdmcli query useraction
[-useraction user_action_name | -imagetype image_type
[-optype MIGRATE_DATABASE]]
Options
Table H-7 ZDMCLI query useraction Options
Option | Description |
---|---|
|
Name of the user action |
-imagetype
image_type |
Specify the image type name |
-optype MIGRATE_DATABASE |
Operation for which the user action is configured |
resume job
Resumes a specified job that was paused.
Syntax
$ZDM_HOME/bin/zdmcli resume job
-jobid job_id
[-pauseafter pause_phase]
Options
Table H-8 ZDMCLI resume job Options
Option | Description |
---|---|
-jobid job_id |
Unique job ID value (integer) for the scheduled job The job ID is assigned when the migration job is scheduled. |
-pauseafter pause_phase |
Pausees the migration job after running the specified phase |
suspend job
Suspends the specified job if running. Executing suspend job
stops the ongoing job at the current workflow phase and allows jobs to be resumed later.
Syntax
$ZDM_HOME/bin/zdmcli suspend job
-jobid job_id
Options
Table H-9 ZDMCLI suspend job Options
Option | Description |
---|---|
-jobid job_id |
Unique job ID value (integer) The job ID number is assigned when the migration job is scheduled. |