Skip to content

delphix_replication

Marcin Przepiorowski edited this page Apr 4, 2018 · 2 revisions

Delphix replication is taking care about dSource, VDB and environment replication. Although there is no such functionality to copy other metadata like users, database templates, operation templates or polices. Dxtoolkit script are able to fix this gap and allow fast copy of the mentioned metadata.

Export from the source engine (SourceEngine)

Export of Delphix Engine users:

dx_get_users -d SourceEngine -export /tmp/source/users.csv -profile /tmp/source/profile.csv

Export of Delphix Engine polices

dx_get_policy.pl -d SourceEngine -export -outdir /tmp/source/policy -mapping /tmp/source/policy.mapping Exporting policy into file /tmp/source/policy/Default Retention.policy
Exporting policy into file /tmp/source/policy/Temporary Space Saver.policy
Exporting policy into file /tmp/source/policy/test.policy
Exporting policy into file /tmp/source/policy/testtf.policy
Exporting policy into file /tmp/source/policy/Default Snapshot.policy Exporting policy into file /tmp/source/policy/ssss.policy
Exporting policy into file /tmp/source/policy/aaaa.policy
Exporting policy into file /tmp/source/policy/Default SnapSync.policy Exporting policy into file /tmp/source/policy/test2.policy
Exporting mapping into file /tmp/source/policy.mapping

Export of Delphix Engine database templates

dx_get_template -d SourceEngine -export -outdir /tmp/source/vdbtemp Exporting template into file /tmp/source/vdbtemp/Empty Template.template Exporting template into file /tmp/source/vdbtemp/Training Template.template Exporting template into file /tmp/source/vdbtemp/QA Template.template Exporting template into file /tmp/source/vdbtemp/new.template
Exporting template into file /tmp/source/vdbtemp/Dev Template.template

Export of Delphix Engine operation templates

dx_get_op_template -d SourceEngine -exportHook -outdir /tmp/source/opertemp
Exporting operation template test1 into /tmp/source/opertemp/test1.opertemp
Exporting operation template after_refresh into /tmp/source/opertemp/after_refresh.opertemp

Import into the target engine (TargetEngine)

After failover of replicated objects is finished the following commands will load a missing metadata.

Import of all users with profiles – for Delphix Engine managed users password will be set to “password”

dx_ctl_users -d TargetEngine -file /tmp/source/users.csv -profile /tmp/source/profile.csv User sysadmin exist. Skipping
User delphix_admin exist. Skipping
User dev_admin created.
User qa_admin created.
User dev created.
User qa created.
User tool created.
User upgr created.
Role OWNER for target Dev Copies set for dev_admin
Role PROVISIONER for target Sources set for dev_admin Role PROVISIONER for target Dev Copies set for qa_admin Role OWNER for target QA Copies set for qa_admin
Role Read for target Analytics set for tool
Role Read for target Break Fix set for tool
Role Read for target Dev Copies set for tool Role Read for target Masked Sources set for tool Role Read for target QA Copies set for tool
Role Read for target Sources set for tool Role Read for target Training set for tool

Import of Delphix Engine polices ( you can ignore errors about Default polices )

dx_ctl_policy -d TargetEngine -import -indir /tmp/source/policy
Importing policy from file /tmp/source/policy/aaaa.policy. Import completed
Policy Default Retention from file /tmp/source/policy/Default Retention.policy already exist. Problem with load policy from file /tmp/source/policy/Default Retention.policy
Policy Default Snapshot from file /tmp/source/policy/Default Snapshot.policy already exist. Problem with load policy from file /tmp/source/policy/Default Snapshot.policy
Policy Default SnapSync from file /tmp/source/policy/Default SnapSync.policy already exist. Problem with load policy from file /tmp/source/policy/Default SnapSync.policy
Importing policy from file /tmp/source/policy/ssss.policy. Import completed
Importing policy from file /tmp/source/policy/Temporary Space Saver.policy. Import completed Importing policy from file /tmp/source/policy/test.policy. Import completed
Importing policy from file /tmp/source/policy/test2.policy. Import completed
Importing policy from file /tmp/source/policy/testtf.policy. Import completed

Update target engine default polices based on source engine

dx_ctl_policy.pl -d TargetEngine -update -indir /tmp/source/policy
Updating policy aaaa from file /tmp/source/policy/aaaa.policy. Update completed
Updating policy Default Retention from file /tmp/source/policy/Default Retention.policy. Update completed Updating policy Default Snapshot from file /tmp/source/policy/Default Snapshot.policy. Update completed Updating policy Default SnapSync from file /tmp/source/policy/Default SnapSync.policy. Update completed Updating policy ssss from file /tmp/source/policy/ssss.policy. Update completed
Updating policy Temporary Space Saver from file /tmp/source/policy/Temporary Space Saver.policy. Update completed
Updating policy test from file /tmp/source/policy/test.policy. Update completed
Updating policy test2 from file /tmp/source/policy/test2.policy. Update completed
Updating policy testtf from file /tmp/source/policy/testtf.policy. Update completed

Load policy to database mapping

dx_ctl_policy.pl -d TargetEngine -mapping /tmp/source/policy.mapping
Applying policy Default Applying policy Default Applying policy Default Applying policy Default Applying policy Default Applying policy Default Applying policy Default Applying policy Default Applying policy Default Applying policy Default
Import database templates
Snapshot to database tftest Apply completed
Snapshot to database testdx Apply completed
Snapshot to database testjs Apply completed
Snapshot to database demo Apply completed
Snapshot to database test1 Apply completed
SnapSync to database racdba Apply completed 
Retention to database racdba Apply completed 
Retention to database test_src Apply completed 
SnapSync to database test_src Apply completed 
Retention to database Oracle dsource Apply completed

Load VDB templates

dx_ctl_template -d TargetEngine -import -indir /tmp/source/vdbtemp/
Importing template from file /tmp/source/vdbtemp//Dev Template.template. Import completed Importing template from file /tmp/source/vdbtemp//Empty Template.template. Import completed Importing template from file /tmp/source/vdbtemp//new.template. Import completed
Importing template from file /tmp/source/vdbtemp//QA Template.template. Import completed Importing template from file /tmp/source/vdbtemp//Training Template.template. Import completed

Import operation templates

dx_ctl_op_template -d TargetEngine -importHook -indir /tmp/source/opertemp
Importing operation template from file /tmp/source/opertemp/after_refresh.opertemp. Import completed 
Importing operation template from file /tmp/source/opertemp/test1.opertemp. Import completed.

Delphix

Clone this wiki locally