Subscribe to Blog via Email
Follow me on TwitterMy Tweets
How many times have you had a developer come to you and say, “I just did a bad thing in the database. Can you recover from what I just did?”
With Delphix virtualization, we make this pretty easy to address from the user interface with a simple slider to recover from a PIT before the catastrophic mistake, but today, we’ll discuss how to do this from the command line
1.Log into the Delphix engine as an admin user.
ssh delphix_admin@<yourengine> delphix > timeflow delphix timeflow > ls
2. Depending on the platform that you’re using, (in our example, we’ll use Oracle) you’ll see the list of the databases available and can choose the one that you want to refresh before the catastrophic incident from the clueless developer
delphix database> select [VDB name]
3. We can do a simple rollback if we just want to go back to the last snapshot or we can use an list command to see more options:
delphix database "[VDB Name]"> rollback
delphix database "[VDB Name]" rollback *> ls Properties type: OracleRollbackParameters credential: (unset) timeflowPointParameters: type: TimeflowPointSemantic container: (required) location: LATEST_POINT username: (unset)
4. So we’ve decided to do a PIT recovery after the mistake and use the following command and then commit the changes:
delphix database "[VDB Name]" rollback *> set timeflowPointParameters.location=82439
delphix database "[VDB Name" rollback *> commit
That’s all there is to it.
So what if the developer is incompetent and screws up repeatedly?
Follow steps 1-4 above and then to purge the problem from the environment, run the following command from the delphix engine:
delphix database developer [developer employee ID] remove *> commit
An eject button we’ve installed in the delphix engine will remove the developer from the premises and Delphix will even submit all necessary paperwork to Human Resources to complete his termination processing.
If you’d like to automate the process, you can create a handy script that simply asks for the following parameters by calling it from any shell, Powershell for windows or even Jenkins as part of DevOps!
Happy April 1st!