Question
· Jul 20, 2022

Howto disable journaling temporarily for one database

Hello everyone,

I want to restore a database from an external backup with the journal files.

The manual says I should (in short):

  1. Stop journaling with ^JRNSTOP
  2. Restore the database file IRIS.DAT
  3. Run the journal restore utility with ^JRNRESTO
  4. Restart journaling ^JRNSTART

Since I want to restore one database only step 1 would disable journaling for the whole instance, not only for the database to be restored. As I understand, it would be impossible to restore a different database if there occurs a problem while journaling is disabled during the recovery process?

My question is: Can journaling be disabled for the database to be restored only, so productions in other namespaces/databases could continue running? 

Regards
Stefan

Product version: IRIS 2021.1
$ZV: IRIS for UNIX (SUSE Linux Enterprise Server for x86-64) 2021.1 (Build 215U) Wed Jun 9 2021 09:48:27 EDT
Discussion (6)1
Log in or sign up to continue

Yes you could edit the database properties ^DATABASE so a particular database did not journal but I would be worried that the journals will also change the other datasets so I would unmount them before applying journals.

It might be better to create a parallel instance and mount the restored database and then replay the journals.

For a production issue I would reach out to the WRC.

The manual says I should (in short):

  1. Stop journaling with ^JRNSTOP

Which manual does it say? Any manual I've read last 20 years says quite opposite: never stop journaling unless you want to get your system in troubles.
It seems that you should not bother on the subject at all: during the database restore it can't be involved in any users' activity, so there would not exist any journal record on its change.

Hello Alexey,

Which manual does it say?  

I'm referring to this section of the manual: Restore Journal Files

It seems that you should not bother on the subject at all: during the database restore it can't be involved in any users' activity, so there would not exist any journal record on its change.

OK: to be safe there should be no activity (all productions stopped) on the entire instance during the restore process, even if only one database is affected.

Regards 
Stefan

Hello Stefan,

Thanks for the reference, while I'm still not sure about the step #2 as ^JRNRESTO provides the  (defaulted) option to disable journaling of updates during the restore to make the operation faster, see the step #10 of Restore Globals From Journal Files Using ^JRNRESTO. Besides, this is the only option compatible with parallel dejournaling. So the idea to switch off journaling system-wide looks excessive.

Regards,
Alexey

Hello Alexey,

thanks for pointing back to the manual! After re-reading this section I found the crucial sentence:

^JRNRESTO restores only to databases whose journal state is Yes at the time of the journal restore.

So, if journaling at database level is set to "no", no journal restore will be performed!

And as you said:  ^JRNRESTO itself provides an option to disable journaling - at the far end of the configuration process.

This might be the answer(s) to my initial question.