Skip to main content
Skip table of contents

CLI cookbook: adding a replication spec

This topic describes how to use the command-line interface to add a replication specification to the Delphix Engine.

Unlike the GUI, the CLI supports the ability to manage multiple replication specifications within a single system. This allows updates to be sent to multiple systems from a single point.

Prerequisites

You should review the topic Replication Overview to understand which objects are copied as part of a backup or restore operation, as well as the dependencies between objects.

Procedure

  1. Switch to the replication spec context.

    CODE
    delphix> cd replication/spec
    delphix replication spec> ls
    Operations
    create
  2. Create a new replication spec.

    CODE
    delphix replication spec> create
    delphix replication spec create *> ls
    Properties
        type: ReplicationSpec
        name: (unset)
        bandwidthLimit: (unset)
        enabled: (unset)
        encrypted: (unset)
        objects: (required)
        schedule: (unset)
        targetCredential:
            type: PasswordCredential
            password: (required)
        targetHost: (required)
        targetPrincipal: (required)
  3. Specify the target hostname, user, and credentials.

    CODE
    delphix replication spec create *> set targetHost=exampleHost.mycompany.com
    delphix replication spec create *> set targetPrincipal=delphix_admin
    delphix replication spec create *> set targetCredential.password=password

Info:
SDD Secure replication
To create a Selective Data Distribution (SDD) type spec set the objectSpecification.type

  1. CODE
    delphix replication spec create *> set objectSpecification.type=ReplicationSecureList

This parameter defaults to ReplicationList which implies a regular replication spec.

Target Principal
The target principal must be a Delphix user on the target host who has domain privileges.

  1. Specify the set of objects to replicate.

    1. To replicate all dSources and VDBs on the system, specify `DOMAIN as the list of objects.

      CODE
      delphix replication spec create *> set objectSpecification.objects=`DOMAIN
    2. To replicate a subset of Groups, VDBs, dSources, and Timeflows specify their names as a comma-separated list.

      CODE
      delphix replication spec create *> set objectSpecification.objects=Group1/vdb1,Group2/vdb2
  1. Name Completion
    The CLI will provide possible completions for all objects in the system, but only groups, dSources and VDBs can be specified. Attempts to replicate other types of objects will generate an error when the operation is committed.

  2. SSD Secure replication
    If objectSpecification.type=ReplicationSecureList was selected, then objectSpecification.containers needs to be used instead of objectSpecification.objects. The containers have to be Masked VDBs

  1. Commit the operation.

    CODE
    delphix replication spec create *> commit
        `REPLICATION_SPEC-1
JavaScript errors detected

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

If this problem persists, please contact our support.