Difference between revisions of "Basic GTM Journaling"
m |
|||
(One intermediate revision by one other user not shown) | |||
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: | |
+ | |||
<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): | |
+ | |||
<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): | |
+ | |||
<code> | <code> | ||
$gtm_dist/mupip backup "*" /tmp/ | $gtm_dist/mupip backup "*" /tmp/ | ||
Line 25: | Line 29: | ||
You should periodically review journal file usage and archive/delete previous generation journal files. | You should periodically review journal file usage and archive/delete previous generation journal files. | ||
− | If you need anything more sophisticated, please | + | If you need anything more sophisticated, please go through the self-paced exercises in the [http://sourceforge.net/projects/fis-gtm/files/GT.M%20Acculturation%20Workshop/ GT.M Acculturation Workshop]. |
− | |||
− | |||
− | |||
− |
Latest revision as of 12:23, 16 April 2011
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 go through the self-paced exercises in the GT.M Acculturation Workshop.