cancel
Showing results for 
Search instead for 
Did you mean: 

MaxDB restore log DR

Former Member
0 Kudos

Hi.

I am trying to write up a restore script which will import log files

until a point in time which is 24 hours earlier than the current time.

This is a requirement from the client in having the DR instance lag the

production instance by about 24 hours.

In my Korn Shell script, I have the following commands:

dbmcli -uUTL -d $ -U c recover_start $ LOG $ UNTIL $ $ ...(check if return code is -8020, then...) dbmcli -uUTL -d $ -U c recover_replace

$ "$" $

However, since the Utility session does not persist across the

different DBMCLI calls, the restore does not happen and the database

shuts down.

Obviously, we need a shell script to put the logic in for checking the

return code since we are trying to do the restore to a point in time.

Hence using a script for the DBMCLI which just runs a set of commands

without logic is not of any help to us.

Can someone please advise of a solution whereby this can be done? Is there

a way to make a Utility session persist across multiple DBMCLI calls?

Best Regards,

Reenal Chandra.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Reenal,

dbmcli itself does support only simple command sequences without control.

You may build a recovery strategy from the backup history with the command backup_history_list before and store the command sequence in such a simple dbmcli command file.

A second way will be to use dbmcli in session mode and control it via redirected input and output pipes to your own script or program.

Last but not least there are also interfaces for scripting languages like perl, python or java which contains a DBM object which correspond to dbmcli in session mode. Check our documentation for more information about these interfaces.

Best reagrds

Bernd