Skip to main content
Delphix

Undoing an Accidental Virtual Database (VDB) Refresh (KBA1013)

 

 

KBA

KBA#
1013

How to Reverse an Accidental Virtual Database Refresh

An accidental refresh of one or more virtual databases (VDBs) from a source database has removed essential data. The option to undo a refresh is available through the Continuous Data Engine User Interface and CLI.

Undoing a Refresh using the GUI

Method 1 - The 'Undo Refresh or Rewind' Option
  1. In the GUI, navigate to the three dots top right of the VDB.
  2. Select Undo Refresh or Rewind.
    UI.png
     
  3. Then click Undo.
    UI2.png
     
  4. Delphix will Undo the Refresh back to the previous time flow.
Method 2 - Rewinding the VDB to a previous snapshot
  1. Select the VDB from Manage > Datasets.
    UI2.1.png
     
  2. Undo the refresh by clicking on a previous snapshot in the timeflow, you will see two left-pointing arrows, that is the rewind symbol.
    UI2.2.png

    Clicking on the two << rewind arrows will bring up the following confirmation modal. Click Rewind to confirm.
    UI2.3.png
     
  3. You can see the rollback job in progress notification in the upper-right Actions pane.
    UI2.4.png
     
  4. When the rollback completes, you will see the rewind buttons are no longer active, meaning the rollback is complete.
    UI2.5.png

 

Undoing a Refresh using the CLI

  1. Log into the Delphix Engine. 

    ssh delphix_admin@delphix_engine
  2. List Timeflows for the database to which you want to rollback.

    de > ls
    de > Timeflow
    de Timeflow > ls
  3. Switch to the VDB you want to rollback.

    de Timeflow > cd /database
    de database > ls
    de database > select "vdb_example"
  4. Use the switchTimeflow operation.

    de database 'vdb_example' > switchTimeflow
    de database 'vdb_example' switchTimeflow *> set Timeflow=<different Timeflow>
    de database 'vdb_example' switchTimeflow *> commit

 

Note

Note:

 The undo option will remain grayed out when there isn't a valid previous Timeflow available or if there is ambiguity relating to which Timeflow to rollback.

A Timeflow is a branch of changes from the original source data that the VDB was provisioned from. This branch is the placeholder or container for Snapshots that have been created (by policy or manually). Each time a VDB is refreshed or provisioned, a new Timeflow is created.

The problem of ambiguity occurs when a Snapshot fails immediately following a refresh operation. The result is an inability to "undo" because there is no mapping to the previous Timeflow.

Example

The following example attempts to undo a refresh of the VDB "myVDB" has failed.
Troubleshooting error: "The selected database "myVDB" does not have a valid previous Timeflow."
Workaround: Consider using swittchTimeflow to manually choose a Timeflow for the database.

Steps leading to failure:

de> database
de database>
de database> select myVDB
de database 'myVDB'>
de database 'myVDB'> undo
de database 'myVDB' undo *> commit
 Error: The selected database "myVDB" does not have a valid previous Timeflow.
 Action: Consider using switchTimeflow to manually choose a Timeflow for the database.
de database 'myVDB' undo *> discard

Resolution

Check if there is a Timeflow available to which you can rollback. This will be something other than the container listed as "DB_PROVISION". The timestamp of the DB_REFRESH container represents the point in time when the Timeflow was created, not the end point in time for the last Snapshot in that Timeflow which will be more recent:

de > cd /Timeflow
de Timeflow> list database='myVDB'
NAME CONTAINER PARENTPOINT.Timeflow PARENTPOINT.LOCATION PARENTPOINT.TIMESTAMP
'DB_REFRESH@2016-02-01T03:00:41' myVDB default 2622919 -
'DB_REFRESH@2016-08-28T13:00:32' myVDB default 2622919 -
'DB_PROVISION@2016-08-28T17:34:36' myVDB default 2622730 -

Once the target Timeflow is established, switch to that Timeflow.

 

Note

Note:

 There is no limitation on switching Timeflows. It is possible to change to a different Timeflow following the initial Timeflow switch.

de> database
de database>
de database> select myVDB
de database 'myVDB'> switchTimeflow 
de database 'myVDB' switchTimeflow *> ls
Properties
 type: SwitchTimeflowParameters
 Timeflow: (required)
de database 'myVDB' switchTimeflow *> set Timeflow='DB_PROVISION@2016-08-28T15:34:36'
de database 'myVDB' switchTimeflow *> commit
 Dispatched job JOB-29
 DB_SWITCH_Timeflow job started for "Untitled/myVDB".
 Starting disable of virtual database.
 Unexporting storage.
 Virtual database successfully disabled.
 Enabling dataset "myVDB".
 Exporting storage containers from the Delphix Engine.
 Mounting datasets.
 Starting virtual database.
 Virtual database "myVDB" was successfully started.
 Dataset "myVDB" enabled.
 DB_SWITCH_Timeflow job for "Untitled/myVDB" completed successfully.