Question
· Nov 14, 2019

I need to restore the previous part of the log,what do I need to do?

My project need to  restore the previous part of the log,  and I use the rountine "^JRNRESTO" and filter.  After recovery completed,  the table structure is restored, but the table data is not restored, also unable to insert data into the table.

The filter is defined as follows:

ZJRNFILT(jid,dir,glo,type,restmode,addr,time)
 New zdh
 Set zdh=$zdatetimeh("11/14/2019 15:18:56")
 If $p(time,",",1)>$p(zdh,",",1) Set restmode=0 Quit
 If $p(time,",",1)<$p(zdh,",",1) Set restmode=1 Quit
 If $p(time,",",2)<$p(zdh,",",2) {
 Set restmode=1
 } Else {
 Set restmode=0
 } Quit

after restore the :

 

 

 

If I add the following line,  data can be recovered。

If type="K" Set restmode=0 Quit

If the previous part of the log has a delete operation, How can I perform delete operations in log recovery as well? This means that the above line is not needed in the filter.
 

Discussion (5)1
Log in or sign up to continue

It all depends from which backup and journal files you start the recovery.

You need to start from a backup  & all journal files from before your event that killed the data (and stop the restore just before that event, which i assume is  11/14/2019 15:18:56). What happened on this time : did you kill some data or remove the class ?

It seems that the restore did not fully restored the class definition : can you go into studio and recompile the class ?

In the class definition, you will find the actual global names where the data is stored (by default it will be ^User.MemberD and ^User.MemberI (and possibly ^User.MemberS). Do you have these globals after the restore ?

Thanks, maybe data was deleted at that time.  I set another time,  the data  recovered.  another question is 

A journal sync can be triggered:

  • Once every two (2) seconds if the system is idle.
  • In an ECP-based distributed cache cluster, by the data server when responding to specific requests (for example, $Increment) from the application servers to guarantee ECP semantics.
  • By a TCOMMIT (in synchronous commit mode, which causes the data involved in that transaction to be flushed to disk) if you are using InterSystems IRIS transactions.
  • As part of every database write cycle by the write daemon.
  • When the journal buffer is full.

if how can I set the size of  journal buffer ,  or force journal sync to be triggered every 2s without waiting for the system to be idle?