How to restore a deleted iManage Folder

Folders can’t be recovered but the files are still present so you can manually recreate the folder and search for the files in iManage and move them back into it. If your not sure all the files you can restore the database to find the old PRJ_ID of the folder then search for the files with that Parent

A script below helps with restoring Subfolders etc : 

The first for the folders, the second for documents. You will also need to run something similar for folder profiles and security, but that should be straight forward.

@prjid would the first folder you wish to restore, the query will pull all of the children.

Replace “PRODUCTION” and “RESTORE” with your own db names.

[pastacode lang=”sql” manual=”!!Of%20course%20use%20at%20your%20own%20risk%2C%20this%20works%20on%20my%20environment%2C%20and%20should%20work%20on%20yours%20too.%20!!%0A%0A–%20Folders%20%2F%20Workspace%0ADECLARE%20%40prjID%20BIGINT%3B%0Aselect%20%40prjid%20%3D%20–PARENT%20FOLDER%20ID%0A%0A%0AWITH%20tblChild%20AS%0A(%0A%20%20%20%20SELECT%20*%20FROM%20%20RESTORE.mhgroup.projects%20WHERE%20prj_pid%20%3D%20%40prjID%0A%20%20%20%20UNION%20ALL%0A%20%20%20%20SELECT%20p.*%20%20FROM%20RESTORE.mhgroup.projects%20p%20JOIN%20tblChild%20c%20%20ON%20p.prj_pid%20%3D%20c.prj_id%0A)%0Ainsert%20into%20PRODUCTION.mhgroup.projects%0ASELECT%20*%20FROM%20tblChild%20where%20prj_id%20not%20in%20(select%20prj_id%20from%20PRODUCTION.mhgroup.projects)%0AOPTION(MAXRECURSION%2032767)%0A%0A%0A–%20Documents%0ADECLARE%20%40prjID%20BIGINT%3B%0Aselect%20%40prjid%20%3D%20–PARENT%20FOLDER%20ID%0A%0AWITH%20tblChild%20AS%0A(%0A%20%20%20%20SELECT%20*%20FROM%20%20mhgroup.projects%20WHERE%20prj_pid%20%3D%20%40prjID%0A%20%20%20%20UNION%20ALL%0A%20%20%20%20SELECT%20p.*%20%20FROM%20mhgroup.projects%20p%20JOIN%20tblChild%20c%20%20ON%20p.prj_pid%20%3D%20c.prj_id%0A)%0A%0Ainsert%20into%20PRODUCTION.mhgroup.project_items%0ASELECT%20s.*%20FROM%20tblChild%20p%0A%20inner%20join%20RESTORE.mhgroup.project_items%20s%20on%20s.prj_id%20%3D%20p.prj_id%0Awhere%20sid%20not%20in%20(select%20sid%20from%20PRODUCTION.mhgroup.project_items)%0AOPTION(MAXRECURSION%2032767)” message=”” highlight=”” provider=”manual”/]

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...