CDP CLI options for Replication Manager
You can use the CDP CLI commands to create, activate, and delete HDFS and Hive replication policies.
CDP CLI options
You can use the following CDP CLI options to perform tasks in Replication Manager:
CDP CLI option | Description |
---|---|
abort-policy* | Aborts all running instances of the specified replication policy. Provide the CRN of the cluster where the replication policy is created and stored. |
activate-hbase-policy* | Resumes the specified suspended HBase replication policy. If the target Cloudera Manager API version is higher than 50, the command resumes all the HBase replication policies between the same source and destination cluster. However, if the target Cloudera Manager API version is lower than 45, the command resumes only the specified HBase replication policy. This command is not available for target Cloudera Manager API versions between 45 and 50. |
activate-policy | Resumes the specified suspended HDFS or Hive replication policy. Provide source CRN for HDFS replication policies and target CRN for Hive replication policies. |
activate-snapshot-policy* | Resumes a suspended snapshot policy run. |
collect-diagnostic-bundle | Triggers the diagnostic bundle collection for the specified HDFS or Hive
replication policy in the target Cloudera Manager. Use the commandId in the command output to download the diagnostic bundle. |
continue-hbase-setup* | Continues the setup of an HBase replication policy. |
create-abfs-credential | Adds a ABFS cloud credentials to use in Replication Manager. |
create-aws-credential | Adds AWS cloud credentials to use in Replication Manager. |
create-gcs-credential* | Adds GCS cloud credentials to use in Replication Manager. |
create-hbase-policy* | Creates an HBase replication policy with the given name on the specified cluster. |
create-policy | Creates an HDFS or Hive replication policy based on the provided parameters. Provide source CRN for HDFS replication policies and target CRN for Hive replication policies. |
create-snapshot-policy* | Creates a HDFS or HBase snapshot policy depending on the details you provide in the snapshot definition. |
delete-credential | Deletes the registered credentials from Replication Manager. |
delete-hbase-policy* | Deletes the specified HBase replication policy permanently. Enter --force if a normal delete fails. For example, when the source cluster is unreachable. |
delete-policy | Deletes the specified HDFS or Hive replication policy. Provide source CRN for HDFS replication policies and target CRN for Hive replication policies. |
delete-snapshot-policy* | Deletes the specified snapshot policy. |
download-diagnostic-bundle | Generates a bundleFile, a binary string
in base64 encoded format, as a ZIP file. Run a script to save the response as a file
to your machine. For example, cat response.json | jq -r ‘.bundleFile’ |
base64 -D >
bundle.zip. The file is generated only if the bundleStatus in the get-command-status command shows DOWNLOADABLE WITH CLI. |
get-cluster-config* | Retrieves configuration of a specific cluster. |
get-command-status | Returns the current status of the collect-diagnostic-bundle command. You can also view the status of any Cloudera Manager command using the relevant input command ID. |
get-credentials | Returns the cloud credentials that are available on the specified cluster. If you provide the credential name and credential ID, the ID is considered by the CDP CLI command. |
get-hbase-time-series* | Returns the time series data for an HBase replication peer depending on the provided parameters. |
get-snapshot-policy* | Retrieves the details about the specified snapshot policy. |
list-all-credentials | Provides a detailed list of cloud credentials across all clusters that are available for Replication Manager. |
list-cluster-service-statuses | Provides the current status of the services on all the clusters that are available for Replication Manager. |
list-clusters | Provides a detailed list of all the clusters that are available for Replication Manager. |
list-paired-hbase-clusters* | Lists the paired clusters to use for HBase replication policies. The first-time setup is complete for paired clusters. |
list-policies | Lists the available replication policies across all the clusters. Enter the source cluster CRN to view the HDFS replication policies and target cluster CRN to view all the Hive replication policies. |
list-policy-jobs* | Returns the list of jobs triggered by the replication policy. This command is a
paginated operation, therefore multiple API calls might be required to retrieve the
entire dataset of results. You can use one of the following methods to retrieve the
results: Use --no-paginate argument to disable pagination. Use --max-items [***total number of items to return***] --starting-token [***token to start paginating***] --page-size [***page size***] to return a specific number of jobs at a time. |
list-snapshot-policies* | Returns a list of all the snapshot policies across all available clusters. |
list-snapshot-policy-jobs* | Retrieves the snapshot history of the specified snapshot policy. |
repair-hbase-policy* | Runs the last failed command for a failed HBase replication policy. |
rerun-policy* | Runs the specified replication policy. |
restore-snapshot* | Restores the specified snapshot. |
retry-failed-hbase-first-time-setup* | Runs the first time setup configuration between the clusters in the specified
HBase replication policy if the first time setup failed for the replication
policy. You can use the following arguments as required:
|
retry-failed-hbase-snapshots* | Reruns only the failed initial snapshots in the replication policy if the policy failed to replicate existing data in some or all the tables. |
suspend-hbase-policy* | Pauses an active HBase replication policy. |
suspend-policy | Stops all the replication tasks defined for the HDFS or Hive replication policy. Provide source CRN for HDFS replication policies and target CRN for Hive replication policies. |
suspend-snapshot-policy* | Suspends the specified snapshot policy. |
update-abfs-credential* | Updates the ABFS cloud credentials. |
update-aws-credential* | Updates the AWS cloud credentials for Replication Manager. |
update-gcs-credential* | Updates the GCS cloud credentials for Replication Manager. |
update-hbase-policy* | Modifies an existing HBase replication policy. You can change the policy name, policy description, and also delete one or more tables from the replication policy. |
update-policy* | Modifies the replication policy. To modify the replication policy, make appropriate changes in the JSON file, save the file, and use it in the update-policy command. Use the rerun-policy command to run the policy. Some elements that you cannot modify include cloud credential, source or target cluster, or source dataset. Create another replication policy to use the new values. |
update-snapshot-policy* | Modifies an existing snapshot policy depending on the arguments you choose. |
verify-hbase-cluster-pair* | Verifies whether the specified pair of clusters are paired, not paired, or
wrongly paired. The wrongly paired status indicates that one or both of the specified clusters are paired to other clusters. |
*The option is a technical preview feature and is not ready for production deployment. The components are provided ‘as is’ without warranty or support. Further, Cloudera assumes no liability for the use of preview components, which should be used by customers at their own risk. For more information, contact your Cloudera account team. |
CDP CLI options to create a replication policy
The following parameters are available in the replicationmanager create-policy CDP CLI option:
Parameter | Description |
---|---|
--cluster-crn | Enter the cluster CRN. To determine the cluster CRN, run the
list-clusters command. Provide the following CRN when
you create a replication policy:
|
--policy-name | Enter a unique name for the replication policy. |
--policy-definition | Enter the policy definition in the $(cat [***policy definition file name***]) format, and then enter the cluster CRN and policy name as command arguments. |
--cli-input-json | Enter the policy definition JSON file path using the cat command to read the data from the file to create and run the replication policy. |
--generate-cli-skeleton | Shows a policy definition template in JSON format. You can copy the output of this command to a file, add the required parameters, and save it as a JSON file. You can use the filename while creating a replication policy. |