APIPythonOpen-Source Solutions

Expand all | Collapse all

Rewind VDB snapshot details

Jump to Best Answer
  • 1.  Rewind VDB snapshot details

    Posted 08-02-2017 08:26:00 AM
    1. 
      Hi All,


    Can anyone help me how do I get the Oracle Snapshot number to pass to my API to


    curl -s -X POST -k --data @- http://${DE}/resources/json/delphix/database/${VDB}/rollback" href="http://${DE}/resources/json/delphix/database/${VDB}/rollback">http://${DE}/resources/json/delphix/database/${VDB}/rollback \
        -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
    {
        "type": "OracleRollbackParameters",
        "timeflowPointParameters": {
        "type" : "TimeflowPointSnapshot",
        "snapshot" : "????"
        }



  • 2.  RE: Rewind VDB snapshot details

    Posted 08-02-2017 08:47:00 AM
    Hi Pantla,

    You will find more detail on the value to set here by checking those docs.

    https://support.delphix.com/Delphix_Virtualization_Engine/Delphix_Admin/How_to_list_Snapshots_used_b...

    https://docs.delphix.com/docs/reference/command-line-interface-guide/cli-cookbook-common-workflows-t...

    The value should be like "@XXXX-XX-XXTXX:XX:XX.XXXZ"

    Or you can use location insted of snapshot

    Regards,

    Mouhssine



  • 3.  RE: Rewind VDB snapshot details

    Posted 08-03-2017 08:46:00 AM

    Thank you Saidi,

    I have a confusion here.. VDB refers to container/ dsource



  • 4.  RE: Rewind VDB snapshot details

    Posted 08-03-2017 09:14:00 AM
    Hi Pantla,

    If this is a question VDB refers to your virtual database and dsource is the copy of your source database from which you create clones.

    Regards,

    Mouhssine


  • 5.  RE: Rewind VDB snapshot details

    Posted 08-03-2017 10:21:00 AM

    Thank you!!

    When am trying to re-wind/rollback my container with the previous snapshot details. Using the Jetstream creds it says that it has no permission to do so


    When I try with the admin creds it says that it is a Jetstream object.\

    This is where am stuck



  • 6.  RE: Rewind VDB snapshot details

    Posted 08-03-2017 11:38:00 AM
    Hi,

    Whene a virtual object is assigned to a container, it will be only managed from there so you no longer use the admin console to refresh/rewind it.

    Could you confirm that you are using the account of the object owner from jet stream to rewind/refresh the object in your container.

    Regards,

    Mouhssine


  • 7.  RE: Rewind VDB snapshot details

    Posted 08-04-2017 08:37:00 AM

    Yes, am passing the details as below


    VDB as "UUKCAXX3" (which is our container name.


    and calling the rollback as below


    curl -s -X POST -k --data @- http://${DE}/resources/json/delphix/database/${VDB}/rollback \
        -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
    {
        "type": "OracleRollbackParameters",
        "timeflowPointParameters": {
        "type" : "TimeflowPointSnapshot",
        "snapshot" : "ORACLE_SNAPSHOT-30286"
        }
    }





  • 8.  RE: Rewind VDB snapshot details

    Posted 08-04-2017 08:50:00 AM
    Hi Pantla,

    I figured it out.

    You API code is acting like if you are using the admin console to refresh the vdb insied your container, This because of the URL path "http://${DE}/resources/json/delphix/database".

    To use the API to manager jetstream object you have to use this path istead " http://${engine}/resources/json/delphix/jetstream/container"

    You can take a look on this example and adapt it to your need, but the mean idea is there to achive the operation.

    https://docs.delphix.com/docs/reference/web-service-api-guide/api-cookbook-common-tasks-workflows-an...


    I will take a look next week to provied you with a sample if you want.

    Regards,

    Mouhssine


  • 9.  RE: Rewind VDB snapshot details

    Posted 08-04-2017 08:58:00 AM

    Thank you so much :) .. it would be really great if I can get the sample



  • 10.  RE: Rewind VDB snapshot details
    Best Answer

    Posted 08-04-2017 09:19:00 AM
    Hi,

    This code still valide for you case.

    https://docs.delphix.com/docs/reference/web-service-api-guide/api-cookbook-common-tasks-workflows-an...


    Run it with a commande like
    # Refresh container from specific point in time of branch 
    #./refreshContainer.sh -t "2016-08-08T10:00:00.000Z" -B JS_BRANCH-50 JS_DATA_CONTAINER-20

    OR
    # Refresh container from latest point in time of Template 
    #./refreshContainer.sh -T JS_DATA_TEMPLATE-13 JS_DATA_CONTAINER-20


    Regards,

    Mouhssine