Undeleting Orchestrator Objects

Have you ever accidentally deleted a Runbook or Folder in Orchestrator and wanted to recover it? Fret not, Orchestrator doesn’t ‘really’ delete things, rather it marks them as ‘Deleted’ in its database. So, if you would like to recover a deleted object simply find it in the DB and switch the flag! Before beginning I should say that you should use this purely as a reference and not supported in any way shape or form

Step 1: Accidently Delete Something (this could be a Runbook, Folder, Variable etc.)

Step 2: Find the Folder you deleted

Useful SQL Query to help you along

Use Orchestrator
Select UniqueID, ParentID, LastModified, Deleted from FOLDERS where Name like 'Central Workflows'

Step 3: Recover the deleted folder

Use Orchestrator
UPDATE FOLDERS set Deleted = 0 where UniqueID = '97627FD3-2CD0-4B88-BA90-6B1BA8C6E4EC'

Step 4: Recover child items

Find Folders deleted around this time

 

use Orchestrator
select * from FOLDERS where Deleted = 1 and LastModified > '2013-04-10 19:38:00.000' and LastModified < '2013-04-10 19:40:00.800'

Changed their deleted bit to 0

use Orchestrator
UPDATE FOLDERS Set Deleted = 0 where Deleted = 1 and LastModified > '2013-04-10 19:38:00.000' and LastModified < '2013-04-10 19:40:00.800'

Find the deleted Runbooks

 

use Orchestrator
select * from POLICIES where Deleted = 1 and LastModified > '2013-04-10 19:38:01.000' and LastModified < '2013-04-10 19:38:04.800'

 

Recover the Deleted Runbooks

use Orchestrator
UPDATE POLICIES Set Deleted = 0 where Deleted = 1 and LastModified > '2013-04-10 19:38:00.000' and LastModified < '2013-04-10 19:40:00.800'

 

Find the Deleted Objects and Recover Them

Rejoice that Orchestrator doesn’t delete things!

Advertisement
Posted in Infrastructure
3 comments on “Undeleting Orchestrator Objects
  1. […] case you deleted the entire runbook, or worse, an entire folder of runbooks, you should check this post, which covers well the rest of the available undeleting tricks – to quote: “Rejoice that […]

  2. Faisal says:

    Perfect this helped me recover my deleted runbook and the related objects….

  3. Gilberto says:

    runbook is recovered empty 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: