11/24/09

MaxL Automation Backup/Recovery

This paper is for the auto backup and recovery process for LDAP Shared Service and Essbase database.
1. In the essbase.cfg file, add:
    SPLITARCHIVEFILE TRUE
    TRANSACTIONLOGDATALOADARCHIVE SERVER_CLIENT

The 1st command will split big archive file into smaller one automatically. The 2nd command will enable the transaction logging.

2.  backupLDAP.bat
The code inside:
@echo off
REM Backup LDAP with HOTBackup
c:\Hyperion\products\Foundation\server\scripts\backup.bat C:\Hyperion\backup\HSS_backup

3. RecoveryLDAP.bat, the code inside:
@echo off

REM Backup LDAP with HOTBackup
c:\Hyperion\products\Foundation\server\scripts\recover.bat C:\Hyperion\backup\HSS_backup

4. BackupEssbaseMaxL.msh
spool on to 'c:\Hyperion\Logs\EssbaseArchive.log';

login $1 $2 on $3;
alter database Sample.Basic force archive to file 'C:\Hyperion\backup\SampleBasic';
alter database Demo.Basic force archive to file 'c:\Hyperion\backup\DemoBasic';
spool off;

5. backupEssbaseBSO.bat
echo off
REM Backup BSO Essbase
set uid=admin
set pwd=password
set svr=bobpc
essmsh "C:\Hyperion\auto\BackupEssbaseMaxL.msh" %uid% %pwd% %svr% %dt% %tm%
ren C:\Hyperion\backup\SampleBasic SampleBasic%date:~4,2%-%date:~7,2%-%date:~10%.arc
ren C:\Hyperion\backup\DemoBasic DemoBasic%date:~4,2%-%date:~7,2%-%date:~10%.arc
The idea is backup with general name, and use bat script rename the backup file with time stamp.

6. RecoveryEssbaseMaxL.msh
spool on to 'c:\Hyperion\Logs\EssbaseArchive.log';

alter database Sample.Basic force restore from file 'C:\Hyperion\backup\SampleBasic.arc';
alter database Demo.Basic force restore from file 'c:\Hyperion\backup\DemoBasic.arc';
alter database Sample.Basic replay transactions using sequence_id_range 2 to 2;
alter database Demo.Basic replay transactions using sequence_id_range 2 to 2;
spool off;

Please select the sequence id range by query
query database Sample.Basic list transactions;



7. RecoveryEssbaseBSO.bat
@echo off
REM Recovery BSO Essbase
essmsh "C:\Hyperion\auto\RecoveryEssbaseMaxL.msh"

The bat file for backup can be scheduled to run daily using Windows Scheduler.