BusinessObjects Board

restoring a specefic folder deleted by error

Hi,

I have never thaught that this could happen, one of my users deleted by error a folder that contians more thant 50 reports. The problem is that if I make a restore my other users will be impacted (and there are many other users). Do you think it’s possible to make a restore of a certain folder.

Regards,


zizou :tunisia: (BOB member since 2008-07-31)

hi

if you have oracle database then i would suggest you to do schema level restore for the particular user. For that you need to send a request to the DBA.

if not please post your environment.

Thanks
Owais Khan
owais@ritnoa.com
www.ritnoa.com


osrootofos :us: (BOB member since 2012-02-10)

Thank you for your reply we are on BO XI 3.1 and our database is SQL. Server.


zizou :tunisia: (BOB member since 2008-07-31)

hi

i came across a solution and would like to share it as it is with the name of the member who wrote the post hope you fine it useful.

"I found a way to restore reports without necessarily having to restore the CMS.

Last week, a user accidentally deleted one of her β€œFavorites” folders. It had 8 reports in it. The only way we knew of getting these back is to use our Development environment to restore the CMS and FileStore and use it to create a picture of Production from the previous weekend. Since we are in a clustered environment, this would involve restarting and stopping services on both Dev and Prod…a big headache!

This is how we got the reports back:

  1. Discovered the folder and report names that were deleted via the auditor tables. You can also find the reports if the user remembers the name of the folder they deleted.

  2. Restored the Weekend CMS table β€œCMS_InfoObjects5” to a temporary location.

  3. Ran the following SQL against this temporary table:
    select objectid, parentid, ownerid, lastmodifytime, upper(left(objectname,len(objectname)-2)) ObjectName,
    typeid, type, si_cuid
    from
    (
    SELECT
    replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(
    replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(
    replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(
    replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(
    replace(replace(replace(replace(replace(replace(replace(
    cast(objname as varchar(2000)),β€˜S’,β€˜v’),β€˜M’,β€˜s’),β€˜A’,β€˜m’),’)’,β€˜a’),’+’,β€˜b’),β€˜C’,β€˜n’)
    ,’-’,β€˜c’),’/’,β€˜d’),β€˜O’,β€˜t’),β€˜E’,β€˜o’),β€˜1’,β€˜e’),β€˜3’,β€˜f’),β€˜G’,β€˜p’),β€˜5’,β€˜g’),β€˜7’,β€˜h’),β€˜W’,β€˜x’)
    ,β€˜U’,β€˜w’),β€˜Q’,β€˜u’),β€˜I’,β€˜q’),β€˜9’,β€˜i’),’:’,β€˜i’),’;’,β€˜j’),β€˜K’,β€˜r’),’=’,β€˜k’),’?’,β€˜l’),’[’,β€˜y’)
    ,’]’,β€˜z’),’!@’,’ β€˜),β€˜B~S’,’&’),’!BO’,’.’),β€˜B|C"’,’(’),’!B|D’,’)’),β€˜M|Z’,’-’),β€˜M}L’,’,’),β€˜M|N’,’_’)
    ,β€˜M}Z’,’:’),’!B{B’,’’’’),’|<','0'),'|>’,β€˜1’),’|@','2'),'|B’,β€˜3’),’|D','4'),'|F’,β€˜5’)
    ,’|H','6'),'|J’,β€˜7’),’|L','8'),'|N’,β€˜9’),’{’,’’),’!’,’’),’"’,’’),’@’,’’)
    ObjectName,
    case
    when TypeID = 262 then β€˜Webi Report’
    when TypeID = 314 then β€˜Deski Report’
    when TypeID = 283 then β€˜PDF’
    when TypeID = 267 then β€˜Text’
    when TypeID = 323 then β€˜Excel’
    when TypeID = 266 then β€˜Universe’
    when TypeID = 278 then β€˜Publication’
    when TypeID = 299 then β€˜Connection’
    when TypeID = 19 then β€˜User type 19’
    when TypeID = 18 then β€˜User type 18’
    when TypeID = 47 then β€˜User type 47’
    when TypeID = 48 then β€˜User type 48’
    when TypeID = 8 then β€˜Shortcut’
    when TypeID = 1 then β€˜Folder’
    when TypeID = 20 then β€˜Groups’
    when TypeID = 13 then β€˜Server’
    when TypeID = 16 then β€˜BO Server’
    when TypeID = 21 then β€˜Event’
    when TypeID = 24 then β€˜License Key’
    else β€˜Other’
    end Type,

FROM bo_xi_admin.[CMS_InfoObjects5]
) BORepository
where ObjectName like β€˜(Name of Folder)%’

This will give you an objectid for the folder, then you can rerun this sql but replace the where clause with β€œParentId = (objectid of folder)”.

This will give you a list of the reports in that folder along with their objectid. This objectid is actually the name of the subfolder containing the .WID file.

  1. Had the FileStore directory restored to a temporary location.

  2. Searched through the Temporary FileStore location for the report object ids (again, the subfolders).

  3. Copied each .wid file to my CPU.

  4. In Infoview, created a temporary report which I called β€œTempWID”.

  5. Once created, went into CMS Administrator to find path of the β€œTempWID” .wid file.

  6. This temporary WID file you created will have a name of something like cdz3Ty56poo33390.wid. I renamed this to cdz3Ty56poo33390.wid_bak, copied in the first .WID file that I wanted restored and renamed it to cdz3Ty56poo33390.wid.

  7. Opened up Infoview and opened up the TempWID. It should open up the restored report. I then saved this report off to my favorites. After I used this method to restore the 8 files, I sent them to her Business Objects Inbox.

This worked so well, that we now keep a table of objectnames, ids and parentids so that we won’t have to restore the CMS table in the future. Also, we’re still on R2 so I’m not sure if the above SQL will work for R3.

Lisa Yates
General Cable
Highland Heights, KY
Business Objects Architect"

Thanks
Owais Khan
owais@ritnoa.com
www.ritnoa.com


osrootofos :us: (BOB member since 2012-02-10)

Hi all, apparently the character inserted in the SQL set is different for BO 40.

All this (below) must be replace for some other set of Hexadecimal characters:
)),β€˜S’,β€˜v’),β€˜M’,β€˜s’),β€˜A’,β€˜m’),’)’,β€˜a’),’+’,β€˜b’),β€˜C’,β€˜n’)
,’-’,β€˜c’),’/’,β€˜d’),β€˜O’,β€˜t’),β€˜E’,β€˜o’),β€˜1’,β€˜e’),β€˜3’,β€˜f’),β€˜G’,β€˜p’),β€˜5’,β€˜g’),β€˜7’,β€˜h’),β€˜W’,β€˜x’)
,β€˜U’,β€˜w’),β€˜Q’,β€˜u’),β€˜I’,β€˜q’),β€˜9’,β€˜i’),’:’,β€˜i’),’;’,β€˜j’),β€˜K’,β€˜r’),’=’,β€˜k’),’?’,β€˜l’),’[’,β€˜y’)
,’]’,β€˜z’),’!@’,’ β€˜),β€˜B~S’,’&’),’!BO’,’.’),β€˜B|C"’,’(’),’!B|D’,’)’),β€˜M|Z’,’-’),β€˜M}L’,’,’),β€˜M|N’,’_’) ,β€˜M}Z’,’:’),’!B B’,’’’’),’|<','0'),'|>’,β€˜1’),’|@','2'),'|B’,β€˜3’),’|D','4'),'|F’,β€˜5’)
,’|H','6'),'|J’,β€˜7’),’|L','8'),'|N’,β€˜9’),’{’,’’),’!’,’’),’"’,’’),’@’,’’)

Any ideas how tor recover docs in BO 40?

Thanks in advance
Reinaldo


reinaldonunez :venezuela: (BOB member since 2004-10-01)

Sometimes people setup what is referred to as a recovery server/system. It’s essentially a separate server with the BOBJ software installed on it. You can then restore your backup from the Prod system to the recovery server and then use a number of different techniques (import wizard, .biar) to move a subset (individual folder) of your content from the recovery server to the Prod server.


clarence (BOB member since 2005-11-18)

Thanks Clarence, we could do that or try to recover the folder with BIAR file in the same server, but instead choosing not replacing anything in the target.

The issue is backup were set weekly for the development folder and the deletion did happen after the last backup was taken.

Again, thanks for your reply, though


reinaldonunez :venezuela: (BOB member since 2004-10-01)

Thanks to the above query from Lisa Yates; very useful! I found in my version (4.0 SP5) that the first character translation worked better than the newer one (the only difference were apostrophes), but some of the object types were no longer valid. I modified the query slightly and thought I would post it here. I don’t guarantee the object types are correct though; if anyone has any improvements please post. I figured out more objects types but there are so many I ended up ignoring the ones I didn’t find useful.

SELECT 
	Type, 
	UPPER(LEFT(ObjectName,LEN(ObjectName)-2)) AS ObjectName, 
	ObjectID, 
	ParentID, 
	CAST(SUBSTRING(LastModified,1,4)+'-'+SUBSTRING(LastModified,6,2)+'-'+SUBSTRING(LastModified,9,5)+':'+
		SUBSTRING(LastModified,15,2)+':'+SUBSTRING(LastModified,18,2)+'.'+SUBSTRING(LastModified,21,3) AS DATETIME) 
		AS LastModified
FROM ( 
 SELECT 
	ObjectID,
	ParentID,
	case 
		when TypeID = 1 then 'Folder' 
		when TypeID = 2 then 'Crystal Report' 
		when TypeID = 14 then 'FRS'
		when TypeID = 16 then 'Server'
		when TypeID = 18 then 'Personal Folder'
		when TypeID = 19 then 'User' -- what are 47,48?
		when TypeID = 20 then 'Group' 
		when TypeID = 57 then 'Access Level'
		when TypeID = 322 then 'Webi Report'
		when TypeID = 346 then 'Universe'
		else 'Other' 
	end AS Type, 
	replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace( 
	replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace( 
	replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace( 
	replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace( 
	replace(replace(replace(replace(replace(replace(replace(
	CAST(ObjName as VARCHAR(2000)),'S','v'),'M','s'),'A','m'),')','a'),'+','b'),'C','n') 
	,'-','c'),'/','d'),'O','t'),'E','o'),'1','e'),'3','f'),'G','p'),'5','g'),'7','h'),'W','x') 
	,'U','w'),'Q','u'),'I','q'),'9','i'),':','i'),';','j'),'K','r'),'=','k'),'?','l'),'[','y') 
	,']','z'),'!@',' '),'B~S','&amp;'),'!BO','.'),'B|C"','('),'!B|D',')'),'M|Z','-'),'M}L',',')
	,'M|N','_'),'M}Z',':'),'!B{B',''''),'`|<','0'),'`|>','1'),'`|@','2'),'`|B','3'),'`|D','4')
	,'`|F','5'),'`|H','6'),'`|J','7'),'`|L','8'),'`|N','9'),'{',''),'!',''),'"',''),'@','') 
	AS ObjectName,
	CAST(LastModifyTime AS VARCHAR(30)) AS LastModified
 FROM CMS_InfoObjects7
 ) BORepository 
WHERE 1=1
	--AND ObjectName LIKE '<USERNAME>%' AND TypeID = 18
	AND ParentId = <ParentObjectID>

[Moderator Edit: Added code formatting - Andreas]


craiggsmith (BOB member since 2009-06-01)