Article
· Oct 12, 2016 3m read

How to cope with "October 11, 2016 – Alert: Caché Online Backup and Journal Restore" in non-patched (yet) Caché 2015.x

The goal of this writing was to illustrate how to restore backup before the patch would be applied. The alert notes that: 

The risk can be avoided by applying journals from the beginning of the journal file that was switched to at the start of the backup, rather than accepting the default of starting from the journal marker position.

Having non-patched Caché 2015.1.4, I ran sample database backup and restore just to get where I should answer "No". Collecting journal info from the backup log: 

*** The time is: 2016-10-12 11:14:24 ***

                 Cache Backup Utility
              --------------------------
Performing a Full backup.
...
Journal file switched to:
d:\intersystems\cache10\mgr\journal\20161012.003

Starting backup pass 1
Backing up d:\intersystems\cache10\mgr\test\ at 10/12/2016 11:14:32
Copied 161841 blocks in 39.471 seconds
...
Journal file 'd:\intersystems\cache10\mgr\journal\20161012.002' and the subsequent ones are required for recovery purpose if the backup were to be restored
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the 1st journal file
Journal marker set at
offset 241566192 of d:\intersystems\cache10\mgr\journal\20161012.004 ; and this is the last one
%SYS> do ^DBREST
... < normal restore workflow - skip it > ...

What journal entries do you wish to apply?
 
     1. All entries for the directories that you restored
     2. All entries for all directories
     3. Selected directories and globals
     4. No entries
 
Apply: 1 => 1
 
We know something about where journaling was at the time of the backup:
0: offset 241566192 in d:\intersystems\cache10\mgr\journal\20161012.004
 
Are journal files created by this Cache instance and located in their original
paths? (Uses journal.log to locate journals)? yes
The earliest journal entry since the backup was made is at
offset 241566192 in d:\intersystems\cache10\mgr\journal\20161012.004
 
Do you want to start from that location? Yes => no ;here is this place!
...
First file to process:  ?
 
 1) d:\intersystems\cache10\mgr\journal\20160913.003
...
34) d:\intersystems\cache10\mgr\journal\20161012.002
35) d:\intersystems\cache10\mgr\journal\20161012.003
36) d:\intersystems\cache10\mgr\journal\20161012.004
37) d:\intersystems\cache10\mgr\journal\20161012.005
 
First file to process:  34 d:\intersystems\cache10\mgr\journal\20161012.002
Final file to process:
  d:\intersystems\cache10\mgr\journal\20161012.005 => 36
 
Please enter a number between 1 and 4
 
Final file to process:
  d:\intersystems\cache10\mgr\journal\20161012.005 => ?
 
1) d:\intersystems\cache10\mgr\journal\20161012.002
2) d:\intersystems\cache10\mgr\journal\20161012.003
3) d:\intersystems\cache10\mgr\journal\20161012.004
4) d:\intersystems\cache10\mgr\journal\20161012.005
 
Final file to process:
  d:\intersystems\cache10\mgr\journal\20161012.005 => 3 d:\intersystems\cache10\mgr\journal\20161012.004
Prompt for name of the next file to process? No => No

< ... skipping the latter as it's normal journal restore workflow... >

I ran a process that created a rather big global in parallel with running backup and checked whether all global nodes were restored correctly. They were.

Hope this info can be useful for somebody who doubts when and whether to answer "No" (as I did).

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