How to perform journal restore programmatically?
Hi,
After restoring all the Cache related files on a machine, I am performing journal recovery using the command "^JRNRESTO". It works as described in the document and the recovery succeeds. However, the command is interactive. Is there a way I can run it in a programmatic way? I don't want to just supply a text file containing answers to all the prompts. I am wondering if there is way I can pass all the information upfront to the command.
Thanks,
Raghu
Hello,
If you haven't already, please take a look at the Journal.Restore class reference at
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=Journal.Restore
The examples, methods and properties described there may provide what you want.
Great. Thanks.
I am curious as to why you would need to run the ^JRNRESTO utility programmatically. Journal restore is already automatic unless Cache is started in maintenance mode. Additionally, if you are using ^JRNRESTO regularly, you may want to open a case with the WRC, as journal restores should probably not be a regular occurrence.
In other words, what is your use case for repeated planned uses of ^JRNRESTO?
I think my following post in this forum may help in understanding the use case.
https://community.intersystems.com/post/does-externalfreeze-command-upda...
In short, the use case is to bring up a Cache instance on a test machine from a production backup. As I explained in the above post, I will bring back all the file systems at same mount points. Are you saying that I can just start Cache in normal mode because recovery happens automatically? The answer in the above post mentions that it is better to do journal recovery.
Hello Raghu --
I think you are interested in doing an unattended restore with ^DBREST. See the documentation for modifying the jrnopt and jrnfile parameters:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
Also an additional doc that may be helpful:
https://community.intersystems.com/product-documentation/cach%C3%A9-data...
HTH, Evan
Thanks. Will take a look.
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue