Difference between revisions of "Basic GTM Journaling"

From VistApedia
Jump to: navigation, search
 
Line 2: Line 2:
  
 
-- Turn on before image journaling:
 
-- Turn on before image journaling:
 +
 
<code>
 
<code>
 
$gtm_dist/mupip set -journal="enable,on,before" -file mumps.dat
 
$gtm_dist/mupip set -journal="enable,on,before" -file mumps.dat
 
</code>
 
</code>
  
* Recover a database file using the journal:
+
-- Recover a database file using the journal:
 +
 
 
<code>
 
<code>
 
$gtm_dist/mupip journal -recover -backward mumps.mjl
 
$gtm_dist/mupip journal -recover -backward mumps.mjl
 
</code>
 
</code>
  
* Create a new journal file (the old journal file has a name of the form mumps.mjl_yyyydddhhmmss where ddd is the day of the year, e.g., today, June 24, 2009, is day 175):
+
-- Create a new journal file (the old journal file has a name of the form mumps.mjl_yyyydddhhmmss where ddd is the day of the year, e.g., today, June 24, 2009, is day 175):
 +
 
 
<code>
 
<code>
 
$gtm_dist/mupip set -journal="on,before" -file mumps.dat
 
$gtm_dist/mupip set -journal="on,before" -file mumps.dat
Line 18: Line 21:
 
This assumes that the database file is mumps.dat and the journal file is mumps.mjl.  GT.M doesn't restrict the name, and databases can be multiple regions.  But these three commands are the most basic.  Please use them so that you don't need a rundown to recover your database after a system crash.
 
This assumes that the database file is mumps.dat and the journal file is mumps.mjl.  GT.M doesn't restrict the name, and databases can be multiple regions.  But these three commands are the most basic.  Please use them so that you don't need a rundown to recover your database after a system crash.
  
* Backup database (creates a new journal file; substitute backup directory for /tmp/ in the following):
+
-- Backup database (creates a new journal file; substitute backup directory for /tmp/ in the following):
 +
 
 
<code>
 
<code>
 
$gtm_dist/mupip backup "*" /tmp/
 
$gtm_dist/mupip backup "*" /tmp/

Revision as of 13:36, 20 November 2010

Here are the most basic instructions to turn on and use journaling. I suggest you do this for any database files that are not throw-away.

-- Turn on before image journaling:

$gtm_dist/mupip set -journal="enable,on,before" -file mumps.dat

-- Recover a database file using the journal:

$gtm_dist/mupip journal -recover -backward mumps.mjl

-- Create a new journal file (the old journal file has a name of the form mumps.mjl_yyyydddhhmmss where ddd is the day of the year, e.g., today, June 24, 2009, is day 175):

$gtm_dist/mupip set -journal="on,before" -file mumps.dat

This assumes that the database file is mumps.dat and the journal file is mumps.mjl. GT.M doesn't restrict the name, and databases can be multiple regions. But these three commands are the most basic. Please use them so that you don't need a rundown to recover your database after a system crash.

-- Backup database (creates a new journal file; substitute backup directory for /tmp/ in the following):

$gtm_dist/mupip backup "*" /tmp/

You should periodically review journal file usage and archive/delete previous generation journal files.

If you need anything more sophisticated, please study the Acculturation CD.

Regards,

-- Bhaskar