This Post defines the simple process on how to setup automatic daily backup of ODI Master and Work Repository. This process is especially important where there is no backup or improper schedule backup is carried out by DBAs.
Steps
Export Master Repository using ODIEXPORTMASTER
Export Work Repository using ODIEXPORTWORK
Refresh the Variable SYSDATE
Delete the Required day files using ODIDELETEFILE
Finally Send Mail for notification ( optional)
ODIEXPORTMASTER
Provide your target directory and give the zip file_name as
MASTER_REP_BACKUP_<%=odiRef.getSysDate(“dd-MM-yyyy”)%>.zip
This way Exported Master Repository is saved with Meaningful Filename and Date of the backup.
ODIEXPORTWORK
Repeat the above process for ODIEXPORTWORK
Provide your target directory and give the zip file_name as
WORK_REP_BACKUP_<%=odiRef.getSysDate(“dd-MM-yyyy”)%>.zip
Sample output of the above files.
Creating daily such Exports of Repository won’t be an ideal solution, so its good to delete the old archive and keep just two days of archive .
To do so , Please follow these simple steps.
Create a variable named ‘SYSDATE’ and write a following query
Here iam using -2 as i want to keep just two days of files and delete all the previous day files.Change this value according to your need.
ODIFILEDELETE
Call ‘ ODIFILEDELETE ‘ to delete the required files.
The Filename ‘ *_#SYSDATE.zip ‘ will delete the required day file. so if the sysdate is 23-09-2009 , the above command will delete 21-09-2009 files.
This simple procedure would enable you to have a simple backup of the Master and Work Repository especially in condition where there is no proper backup of Development database or backup is not being carried out at proper interval.
Schedule the Package using ODI Scheduler and schedule it accordingly and add odisendmail for any success or failure notification.
[ Note : No write permission should be given any ODI developer in the Archived Folder so that no one deletes the above file accidentally or corrupt them with improper handling. Only ODI should be have write access to this Folder]
If any error occurred and you are not being able to recover the Database or Repository ,these backup files can come into handy and using the right Import procedure the whole Development box can be brought back to action. Please keep looking into future post of ‘ odiexperts.com ‘ for how to do a proper Import without affecting objects Internal Id .
February 23, 2018 at 3:31 PM
Hi everyone is there any automated process is there to clean up ODI I$ and C$ work tables?
November 27, 2017 at 10:56 AM
Do we need to create the folder manually or will it create automatically?
Thanks in adv.
Rakesh
November 27, 2017 at 10:56 AM
Do we need to create the folder manually or will it create automatically?
Because i am not able to see any zip files under the path i have given…
Thanks in adv.
Rakesh
November 27, 2017 at 10:55 AM
Hi,
The package is showing completed but there is no file showing up at the target directory.
Thanks,
Rakesh CR
February 2, 2016 at 12:19 PM
Hi,
The package is showing completed but there is no file showing up at the target directory.
August 3, 2015 at 6:47 AM
Hi
I am not able to get the projects which I had created in ODI studio, can you please say me how you have got the details of the projects of the work repository,
I have created projects in ODI console of WORKREP1. I am logging into ODI console with repository: WORKREPOSITORY and user: supervisor. then inside it is showing nothing about the work repository.
please enlighten me or post about this. 🙁
Thanks,
Santhosh
July 30, 2015 at 5:17 AM
hi Kshitiz ,
we have a problem where the dev box disk failed and no new backup. Is there a way that we can recover from the live environment from the xmls?
July 20, 2011 at 11:57 AM
Can anyone tell me exactly which classes are exported for each of the Snp class names a recursive export it taken?
I’m building something to integrate ODI and SVN and need to know which to use recursive and which non recusive exports for.
I don’t want scenarios only the source objects for check in/out to/from SVN.
Thanks!
September 11, 2014 at 10:01 AM
Hi Mark,
did you manage to integrate ODI and SVN, i have similar job to do, but need to know how to integrate ODI with SVN.
August 21, 2010 at 3:46 AM
Similaraly can we automize the backup for dataserver also?
Thanks
August 21, 2010 at 12:44 PM
You can use OdiExportObject and specify the CLASS_NAME=SnpConnect and specify the Internal Id of the data server for OBJECT_ID and give the File name in XML (ex. DATA_SERVER_ORCL.XML)
At a time only one Dataserver can be exported so repeat the same for required number of Data server to be exported.
Learn more about OdiExportObject through the Oracle Tools Reference Manual –
May 12, 2010 at 1:31 AM
Do i no need to take backup of scnarios xml files.As work repository have storage of meta data(information only not code) or any of SNP tables will have xml files stores.o do have backup of work repo. but will it be efficiant in case of server crash.
May 12, 2010 at 1:28 AM
will the code(xml scenario files)also get stored in work repository metadata.Which SNP table will have the files or i need to store xml files to have backup.if some crash happen will just backup of work repository and master repository enough and no need to take backup of files.As all snp tables of work repository have info not code stored.please clerify
May 13, 2010 at 2:30 PM
Hi Ram
To Answer your query , well when you take a back up of ODI MASTER and WORK Repository , you will have every objects including scenarios captured in the work_repository.zip . So you dont have to worry about backing up other things separately. ODI accordingly will create required XML files from the SNP tables automatically into respective XML.
You can do sample testing by doing a backup of Work Repository and look into it and see how its storing data , that will answer all your queries.
Hope that helps.
October 6, 2009 at 8:38 AM
Aproximately how long will it take to complete this backup of the master and work repository. For example i have master repositroy and work repository of size around 300 MB.
Also during this export i am assuming i can not do the development in the work repository. Is it correct?
October 6, 2009 at 10:34 AM
Hi Dhamod,
Yes certainly , set the time using odi scheduler during the time when there is no development carried out. As there are chances of corruption or improper export when there is development activity being carried out.
Secondly the export time depends on your Network speed and other hardware .