Skip to main content
Skip table of contents

CockroachDB linking operations

dSource creation via CLI

To create a dSource via CLI, you must create a source configuration first. For more information on creating a source configuration, refer to Add Source Config using CLI.

To create a dSource and perform operations via CLI, login to the Delphix Continuous Data Engine using the admin user account.

CODE
ssh admin@<CONTINUOUS-DATA-FQDN-or-IP>

Set default linking parameters[This is common for all types of ingestions]:

Run the below commands to set the default linking parameters. The below example uses testscfg source config.

CODE
Example -
database link
set type=LinkParameters
set linkData.type=AppDataStagedLinkData
set name=dlpxstg
set group=cockroach
set linkData.config=dlpxstg
set linkData.environmentUser=crdb-stg/delphix
set linkData.stagingEnvironment=crdb-stg
set linkData.stagingEnvironmentUser=crdb-stg/delphix
set linkData.syncParameters.parameters={\"resync\":true}

Link parameters for Seed ingestion type:

Run the below commands to link parameters for seed ingestion type.

CODE
Example - 
set linkData.parameters="{\"dsource_type\":\"Seed\",
\"mount_path\":\"/mnt/provision/dlpxstg\",
\"ip_addr\":\"10.43.35.72\",\"cockroach_port\":26257,
\"cockroach_db_console_port\":8080,\"cert_dir\":\"/home/delphix/toolkit\",
\"cluster_config\":3,\"crdb_parameters\":[{\"property_name\":\"max-sql-memory\", 
\"value\":\"0.25\"}]}"

Link parameters for AWS_S3 ingestion type:

Run the below commands to link parameters for AWS_S3 ingestion type.

CODE
Example - 
linkData.parameters="{\"dsource_type\":\"AWS_S3\",
\"mount_path\":\"/mnt/provision/dlpxstg-s3\",
\"ip_addr\":\"10.43.34.131\",\"cockroach_port\":36257,
\"cockroach_db_console_port\":9080,\"backup_piece\":\"/2022/04/12-105100.23\",
\"object_storage\":\"dlpx-crdb-backup/crdb_full\",\"account_name\":
\"****************\",\"account_secret_access_key\":\"*****************\",
\"enable_secure_mode\":true,\"cert_dir\":\"/home/delphix/toolkit\",
\"cluster_config\":3,\"crdb_parameters\":[{\"property_name\":\"max-sql-memory\", 
\"value\":\"0.25\"}]}"

Link parameters for Disk ingestion type:

Run the below commands to link parameters for Disk ingestion type.

CODE
Example - 
linkData.parameters="{\"dsource_type\":\"Disk\",
\"mount_path\":\"/mnt/provision/dlpxstg-disk\",
\"ip_addr\":\"10.43.34.131\",\"cockroach_port\":56257,
\"cockroach_db_console_port\":5080,\"backup_piece\":\"/2023/10/04-150211.01\",
\"staging_host_backup_path\":\"/home/delphix/backups\",
\"enable_secure_mode\":true,\"cert_dir\":\"/home/delphix/toolkit\",
\"cluster_config\":3,\"crdb_parameters\":[{\"property_name\":\"max-sql-memory\", 
\"value\":\"0.25\"}]}"

Link parameters for GCP ingestion type:

Run the below commands to link parameters for GCP ingestion type (specified authentication). 

CODE
Example -  

set linkData.parameters="{\"dsource_type\":\"GCP\",\"mount_path\":\"/mnt/provision/dlpxstg-gcp\", 
\"ip_addr\":\"10.43.34.131\",\"cockroach_port\":36257, 
\"cockroach_db_console_port\":9080,\"backup_piece\":\"/2022/04/12-105100.23\", 
\"object_storage\":\"dlpx-crdb-backup/crdb_full\",\"enable_auth_implicit\": 
false,\"encoded_key\":\"*****************\", 
\"enable_secure_mode\":true,\"cert_dir\":\"/home/delphix/toolkit\", 
\"cluster_config\":3,\"crdb_parameters\":[{\"property_name\":\"max-sql-memory\",  
\"value\":\"0.25\"}]}" 

Run the below commands to link parameters for GCP ingestion type (implicit authentication). 

CODE
Example -  

set linkData.parameters="{\"dsource_type\":\"GCP\",\"mount_path\":\"/mnt/provision/dlpxstg-gcp\", 
\"ip_addr\":\"10.43.34.131\",\"cockroach_port\":36257, 
\"cockroach_db_console_port\":9080,\"backup_piece\":\"/2022/04/12-105100.23\", 
\"object_storage\":\"dlpx-crdb-backup/crdb_full\",\"enable_auth_implicit\": 
true,\"credential_file \":\"/home/delphix/gcp_cred_file.json\", 
\"enable_secure_mode\":true,\"cert_dir\":\"/home/delphix/toolkit\", 
\"cluster_config\":3,\"crdb_parameters\":[{\"property_name\":\"max-sql-memory\",  
\"value\":\"0.25\"}]}" 

Commit

Run the below command to commit the change

CODE
commit;

Disable

Run the below command to disable the dSource.

CODE
Example - 
source
select dlpxstg
disable
commit

Enable

Run the below command to enable the dSource.

CODE
Example - 
source
select dlpxstg
enable
commit
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.