Rewind VDB snapshot details

  • 1
  • 1
  • Question
  • Updated 10 months ago
  • Answered
  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 \
    -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
    "type": "OracleRollbackParameters",
    "timeflowPointParameters": {
    "type" : "TimeflowPointSnapshot",
    "snapshot" : "????"
    }

Photo of Chandrasekhar Pantla

Chandrasekhar Pantla

  • 242 Points 100 badge 2x thumb
  • confused

Posted 10 months ago

  • 1
  • 1
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb
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

Thank you Saidi,

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

Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb
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

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

Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb
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

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"
    }
}



Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb
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

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

Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb
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