APIMaskingSidekickPythonOpen-Source Solutions

 View Only
  • 1.  Identify engine from hook script

    Posted 06-27-2023 05:11:00 PM

    Hi - Can anyone tell me how to identify the engine that is running a hook script from within the script please?  Creating a script to trigger replication and want to know which engine is running the script so I can login and get the replication spec.

    cheers

    Murray



    ------------------------------
    Murray Penno
    Senior Project Manager
    ANZ Bank New Zealand Limited
    ------------------------------


  • 2.  RE: Identify engine from hook script

    Posted 06-29-2023 06:45:00 AM

    Hello Murry, 

    I did not your question fully.

    As per my understanding to trigger the replication, you can use dxtoolkit commands and then set those commands in the crontab job to trigger that replication profile.

    Example:

    Create replication profile on Delphix engine via GUI

    on linux server where Dxtoolkit is present.

    create script rep.sh 

    vi rep.sh

    <<path to dxtoolkit>>/dxtoolkit2/dx_ctl_replication -d <<ENGINE NAME>> -profilename <<PROFILE NAME>> -safe > <<path to dxtoolkit>>/dxtoolkit2/log/REP.log

    Save the file

    Chmod 755 rep.sh

    execute and test is the replication job getting launched or not.

    put the script into crontab job  ( Below script launch 12.30 AM every day)

    30 00 * * 1-7 sh <<path to dxtoolkit>>/dxtoolkit2/bin/REP.sh



    ------------------------------
    Pankaj Asegaonkar
    Masking/Virtualization Specialist
    +91 9689996500
    ------------------------------



  • 3.  RE: Identify engine from hook script

    Posted 06-29-2023 02:16:00 PM

    That approach would certainly trigger replication but I want to trigger replication from a post snapshot hook. The refreshes are as required, not scheduled.

    We use scripts to mask data on refresh (configure clone hook).  Once the refresh and masking has completed successfully we want to kickoff the replication spec.  We use direct API calls in our scripts.  To make the post snapshot script general I want to be able to identify the engine that is running the script.  I can then login to it to execute the replication.  There are a number of environment variables provisioned by delphix to show which dataset is being refreshed but I can't se anything that point to the engine.



    ------------------------------
    Murray Penno
    Senior Project Manager
    ANZ Bank New Zealand Limited
    ------------------------------