Skip to main content
Skip table of contents

PostgreSQL link operations via CLI

dSource creation from 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

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

CODE
ip-10-110-238-142> database link
ip-10-110-238-142 database link *> set linkData.type=AppDataStagedLinkData 
ip-10-110-238-142 database link *> set name=testds
ip-10-110-238-142 database link *> set group=Untitled
ip-10-110-238-142 database link *> set linkData.config=testscfg
ip-10-110-238-142 database link *> set linkData.environmentUser=rh83-pg14-tec.dlpxdc.co/postgres

ip-10-110-238-142 database link *> set linkData.stagingEnvironment=rh83-pg14-tec.dlpxdc.co

ip-10-110-238-142 database link *> set linkData.stagingEnvironmentUser=rh83-pg14-tec.dlpxdc.co/postgres

ip-10-110-238-142 database link *> set linkData.syncParameters.parameters={\"resync\":true}

Link parameters for Delphix initiated backup with memory and DB config

Run the following commands to link parameters for Delphix-initiated backup with memory and DB configuration.

CODE
set linkData.parameters="{\"mountLocation\":\"/tmp/DIBR\",\"externalBackup\":[], \"delphixInitiatedBackupFlag\":true, \"privilegedOsUser\":\"\", \"delphixInitiatedBackup\":[{\"userName\":\"delphix\",\"userPass\":\"password\", \"sourceHostAddress\":\"c78-pg12-s2.dlpxdc.co\", \"postgresSourcePort\":5432}], \"singleDatabaseIngestionFlag\":false,\"singleDatabaseIngestion\":[], \"postgresPort\":5442, \"configSettingsStg\":[{\"propertyName\":\"wal_keep_segments\", \"value\": \"9\"}]}"

Link parameters for log shipping with externally initiated backup 

Run the following commands to link parameters for Log Shipping with Externally Initiated Backup.

CODE
set linkData.parameters="{\"mountLocation\":\"/tmp/DIBR\",\"externalBackup\":[], \"delphixInitiatedBackupFlag\":true, \"privilegedOsUser\":\"\", \"delphixInitiatedBackup\":[{\"userName\":\"delphix\",\"userPass\":\"password\", \"sourceHostAddress\":\"c78-pg12-s2.dlpxdc.co\", \"postgresSourcePort\":5432}], \"singleDatabaseIngestionFlag\":false,\"singleDatabaseIngestion\":[], \"postgresPort\":5442, \"configSettingsStg\":[{\"propertyName\":\"wal_keep_segments\", \"value\": \"9\"}]}"

Link parameters for PostgreSQL streaming replication with externally initiated backup:

Run the following commands to link parameters for PostgreSQL streaming replication with externally initiated backup.

CODE
set linkData.parameters="{\"mountLocation\":\"/tmp/mntp\",\"externalBackup\":[{\"backupPath\":\"/tmp/backup\", \"walLogPath\":\"/tmp/backup\", \"keepStagingInSync\":false}], \"delphixInitiatedBackupFlag\":false, \"delphixInitiatedBackup\":[], \"singleDatabaseIngestionFlag\":false,\"singleDatabaseIngestion\":[], \"stagingPushFlag\":true,\"postgresPort\":5436, \"configSettingsStg\":[]}"

Link parameters for Delphix-initiated single database backup ingestion

Run the following commands to link parameters for Delphix-initiated Single Database backup ingestion.

CODE
set linkData.parameters="{\"mountLocation\":\"/tmp/singledb2\",\"privilegedOsUser\":\"\",\"externalBackup\":[], \"delphixInitiatedBackupFlag\":false, \"delphixInitiatedBackup\":[],\"singleDatabaseIngestionFlag\":true,\"singleDatabaseIngestion\":[{\"databaseName\":\"postgres\", \"databaseUserName\":\"postgres\", \"databaseUserPassword\":\"postgres\", \"sourceHost\":\"rh83-pg14-sec.dlpxdc.co\", \"sourcePort\":5432, \"dumpDir\":\"/home/postgres\", \"dumpJobs\":2, \"restoreJobs\":2, \"postgresqlFile\":\"\"}],\"stagingPushFlag\":false,\"postgresPort\":5435, \"configSettingsStg\":[]}"

Link parameters for staging push

Run the following commands to link parameters for staging push.

CODE
set linkData.parameters="{\"mountLocation\":\"/tmp/pg_basebackupD\",\"privilegedOsUser\":\"\",\"externalBackup\":[], \"delphixInitiatedBackupFlag\":false, \"delphixInitiatedBackup\":[],\"singleDatabaseIngestionFlag\":false,\"singleDatabaseIngestion\":[],\"stagingPushFlag\":true,\"postgresPort\":5433, \"configSettingsStg\":[]}"

Commit

Run the following command to commit the change.

CODE
commit;

Disable

Run the following command to disable the dSource.

CODE
source
select testdb
disable
commit

Enable

Run the following command to enable the dSource.

CODE
source
select testdb
enable
commit

JavaScript errors detected

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

If this problem persists, please contact our support.