Skip to main content
Delphix

How to Provision a PostgreSQL VDB from the Delphix Command Line Interface (KBA8910)

 

KBA

KBA# 8910

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases
6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1

How to Provision a PostgreSQL VDB from the Delphix Command Line Interface

This article illustrates how to provision a PostgreSQL VDB from the Command Line Interface (CLI).

Prerequisites

Create a PostgreSQL dSource. See the documentation section titled "Linking Data Sources and Syncing Data with PostgreSQL" for detailed instructions.

To Provision a VDB from the CLI

Complete the following steps to provision a VDB from the Delphix Command Line Interface (CLI):

  1. Establish an ssh connection to the Continuous Data Engine with your user.
     
  2. Type "database", press enter, and then type "provision" and press enter again to get into VDB provisioning command. Fill in the bolded properties with values appropriate to your environment:
    $ ssh admin@delphix.acme.com
    Password: 
    delphix.acme > database 
    delphix.acme database> provision
    delphix.acme database provision *> set type=AppDataProvisionParameters 
    delphix.acme database provision *> set container.name=Vpostgres
    delphix.acme database provision *> set container.group="PostgreSQL VDB" 
    delphix.acme database provision *> set source.allowAutoVDBRestartOnHostReboot=true
    delphix.acme database provision *> set source.parameters={\"postgresPort\":5432,\"configSettingsStg\":[]}
    delphix.acme database provision *> set sourceConfig.name=stg_pgprod20
    delphix.acme database provision *> set sourceConfig.repository="Postgres vFiles (11.2)" 
    delphix.acme database provision *> set timeflowPointParameters.container=TestSource
    delphix.acme database provision *> set sourceConfig.path=/mnt/provision/newVDB
    delphix.acme database provision *> commit
    

 

Note

Notes:

If you press the TAB key twice after the equal sign (=), Delphix will list the possible values for parameters such as type, source.allowAutoVDBRestartOnHostReboot, sourceConfig.repository.

Important changes for each environment:

  • Change the PostgreSQL port "5432" to one that is not currently being used on the target host by any other processes.
  • Change the "sourceConfig.path" to match your sudo permissions to whatever directory you wish to mount the VDB under.

The "source.parameters" property must be a valid JSON string with double quotes that are escaped. For example:

delphix.acme database provision *> set source.parameters={\"postgresPort\":5477,\"configSettingsStg\":[{\"propertyName\":\"ssl\",\"value\":\"true\"},{\"propertyName\":\"ssl_cert_file\",\"value\":\"/tmp/ssl/server.crt\"},{\"propertyName\":\"ssl_key_file\",\"value\":\"/tmp/ssl/server.key\"},{\"propertyName\":\"log_filename\",\"value\":\"postgresql_a.log\"}]}
delphix.acme database provision *> commit
    `APPDATA_CONTAINER-209
    Dispatched job JOB-4257
    DB_PROVISION job started for "PostgreSQL dSource/VparameterTest".
    Starting creation of virtual dataset "TestSource".
    Creating new TimeFlow.
    Exporting storage containers from the Delphix Engine.

 

  1. You can type "ls" before typing "commit" to get a listing of all the parameters (required parameters are denoted with "(required)" and must be entered):
delphix.acme database provision *> ls
Properties
    type: AppDataProvisionParameters (*)
    container:
        type: AppDataContainer
        name: Vpostgres (*)
        description: (unset)
        group: PostgreSQL dSource (*)
        sourcingPolicy: (unset)
    masked: (unset)
    maskingJob: (unset)
    source:
        type: AppDataVirtualSource
        name: (unset)
        additionalMountPoints: (unset)
        allowAutoVDBRestartOnHostReboot: (required)
        config: (unset)
        logCollectionEnabled: false
        operations: (unset)
        parameters: {"postgresPort":5432,"configSettingsStg":[]} (*)
    sourceConfig:
        type: AppDataDirectSourceConfig
        name: stgprod (*)
        environmentUser: (unset)
        linkingEnabled: true
        parameters: (unset)
        path: /mnt/provision/newVDB (*)
        repository: Postgres vFiles (14.2) (*)
    timeflowPointParameters:
        type: TimeflowPointSemantic
        container: Source9 (*)
        location: LATEST_POINT

 

 

Related Articles

The following articles may provide more information or related information to this article: