In my last post
Hyperion Data Backup Automation I explained a method to perform data backup automation for Essbase\Planning applications.
In this post I am going to explain how to automate metadata backup of all Hyperion components (Example: Rule Files, Essbase Outline, Planning components like forms , business rules ,custom menus, Planning outline, calculation scripts etc ) other than data.
There can be multiple ways based on the component you want to take backup like planning dimension hierarchies can be backup using
Outline Load utility. Similarly for forms you can use
FormDefUtil and for security you can use
Import &Export Security utility but the method I am demonstrating can be used to take backup of all or selective components using LCM command line utility.
LCM command line utility can be find under your epm instance bin folder like below:
D:\Oracle\Middleware\user_projects\epmsystem1\bin\Utility.bat
Before start with automation lets understand how manual LCM works by logging into Shared services. For demonstration I am taking an example of one Planning application as it also cover all Essbase components:
To export Planning\Essbase artifacts for backup or for migration purposes you need to login to Hyperion Shared services. Under Application group expand the Planning folder and click on application under it which you want to export.After selecting the application you can see multiple checkbox at right to select the artifacts you want to export. You can expand each category and select artifacts you want to export leaving data option unchecked as we don't want to export data using LCM.
After you make the selections you need to click on Export and provide the export folder name to begin exporting artifacts. All artifacts will be exported in the folder name you have provided under below path which is import_export folder you configured at the time of application configuration :
D:\Oracle\Middleware\user_projects\epmsystem1\import_export
Navigate to above path and open the application export folder. You will see two xml files under that folder named as Export.xml and Import.xml each file is having the list of components you have exported and respective path in the exported folder.
Automating above LCM export:
Setup a folder named as Automation where you will be writing a script to automate export. You need to perform a first time manual setup to perform that please follow below steps.
- Open a command prompt and execute below command
D:\Oracle\Middleware\user_projects\epmsystem1\bin\Utility.bat D:\Oracle\Middleware\user_projects\epmsystem1\import_export\<Exported folder>\Export.xml
Note: Modify the directory path in the above command as per your environment and replace <Exported Folder> with the folder name you have exported with LCM in the previous step.
- After entering above command system will ask you to provide username and password to perform the LCM export. In my case I have provided credentials for Admin user.
- As soon as you hit enter username and password provided by you will be embedded into below file. You have to react very quickly here and as soon as you hit enter you need to copy below Export.xml file from below path to Automation folder as once the export is completed by above script Export.xml will again be overwritten and you will loose encrypted credentials in the xml file.
D:\Oracle\Middleware\user_projects\epmsystem1\import_export\<Exported folder>\Export.xml
- The above export will export all artifacts same as manual LCM export through shared services and exported artifacts will be present in below folder which you can later use to import back through LCM.
D:\Oracle\Middleware\user_projects\epmsystem1\import_export\<Exported folder>\
- To double check you can now compare the two files to make sure credentials are present in the Export.xml which is copied over to Automation folder
Export.xml present in Automation folder which contains username and encrypted password:
Export.xml present in (D:\Oracle\Middleware\user_projects\epmsystem1\import_export\<Exported folder>\Export.xml
) after export is completed which does not contain credentials:
- Now rename the xml file to append application name in front of it in Automation folder which contains credentials and in the next step you will create a batch script to automate the export which you just performed manually. Renaming of file is not a mandate but if you are automating backup for multiple application in your environment you will be require to repeat all the above steps for each application and all the xml files will be residing in Automation folder so you need to give unique application based name to each file.
- Next create a batch file and embedded below command in the batch.
copy D:\Automation\XML\Export_<application_name>.xml D:\Oracle\Middleware\user_projects\epmsystem1\import_export\<application folder>\Export.xml
D:\Oracle\Middleware\user_projects\epmsystem1\bin\Utility.bat D:\Oracle\Middleware\user_projects\epmsystem1\import_export\<application folder>\Export.xml
Note: In the above script you are copying xml file from Automation folder to application folder under import_export directory and then calling LCM utility to launch the export. By running this script you don't need to provide credentials while running the utility as credentials are embedded in the xml file which you are copying to application folder.
- Now just schedule the above batch using task scheduler as per your backup frequency and you are all set.