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