Skip to content

Commit

Permalink
Issue #58: add newExtentForRecovery command ... remove tranlogs in ne…
Browse files Browse the repository at this point in the history
…wExtent command do not remove trnalogs in newExtentForRecovery ... rename stoneExtent to stoneNewExtent [ci skip]
  • Loading branch information
dalehenrich committed Mar 21, 2015
1 parent 6be949f commit 5bec1a7
Show file tree
Hide file tree
Showing 20 changed files with 88 additions and 12 deletions.
6 changes: 4 additions & 2 deletions bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ Scripts that run on the server machine only.
|[startStatmonitor][9]| Start statmonitor for the given stone. Two statmonitors are started. One that collects a sample every second and is restarted every hour. One that collects a sample once a minute and is restarted once a day. |
|<a name="startStone"></a>
[startStone][10]| Start the stone process for the given stone.|
|[stoneExtent][11]| Copy a new extent into the stone's extent directory. Stone should be shutdown before copying. |
|<a name="stoneNewExtent"></a>
[stoneNewExtent][11]| Copy a new extent into the stone's extent directory. Stone should be shutdown before copying. |
|[stoneExtent][11]| See [stoneNewExtent](#stoneNewExtent) |
|[stones][12]| List information about the installed GemStone/S produects, existing stones, running stones and running netldis.|
|<a name="stopStone"></a>
[stopStone][13]| Stop the named stone. The netldi is left running. Any statmonitor processes associated with the stone will be stopped.|
Expand Down Expand Up @@ -67,7 +69,7 @@ Special purpose utility scripts.
[8]: startNetldi
[9]: startStatmonitor
[10]: startStone
[11]: stoneExtent
[11]: stoneNewExtent
[12]: stones
[13]: stopStone
[14]: createTodeImage
Expand Down
2 changes: 1 addition & 1 deletion bin/createStone
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fi
echo "Creating stone $stoneName"
$pharo/pharo $pharo/todeClient.image createStone $stoneName $gsvers

$GS_HOME/bin/stoneExtent $noRestartArg $snapshotFileArg $stoneName
$GS_HOME/bin/stoneNewExtent $noRestartArg $snapshotFileArg $stoneName

if [ "${noRestartArg}x" = "x" ] ; then
$GS_HOME/bin/startNetldi $stoneName
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
actions
removeTranlogs:
tranlogDirectory
tranlogDirectory deleteAllChildren.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
snapshotsHome
^ self stonesHome / self stoneName / 'snapshots'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
tranlogsHome
^ self stonesHome / self stoneName / 'tranlogs'
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@
"createEmptyStatsSubDirectories:" : "dkh 7/19/2014 17:31",
"createEmptySubDirectories:" : "dkh 7/19/2014 07:50",
"createProductLn:" : "dkh 7/19/2014 07:50",
"createTodeDescription:" : "dkh 7/24/2014 14:54",
"createTodeDescription:" : "dkh 7/25/2014 14:17",
"createTopaziniFile:" : "dkh 7/28/2014 17:42",
"extentsHome" : "dkh 7/19/2014 08:28",
"gemstoneBin" : "dkh 3/19/2015 12:41",
"gitHome" : "dkh 7/19/2014 07:51",
"gsDownloadName" : "dkh 7/19/2014 07:51",
"gsVers" : "dkh 7/19/2014 07:53",
"removeTranlogs:" : "dkh 3/20/2015 18:26",
"snapshotFile" : "dkh 3/19/2015 12:05",
"snapshotsHome" : "dkh 3/20/2015 18:05",
"statsSubDirectories" : "dkh 7/19/2014 17:30",
"stoneName" : "dkh 3/19/2015 12:00",
"subDirectories" : "dkh 3/19/2015 11:47",
"templateFiles" : "dkh 7/19/2014 07:51" } }
"templateFiles" : "dkh 7/19/2014 07:51",
"tranlogsHome" : "dkh 3/20/2015 18:04" } }
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"instance" : {
"activate" : "dkh 2/22/2015 11:23",
"installTode" : "dkh 7/19/2014 11:47",
"installTode2" : "dkh 7/19/2014 14:51",
"installTode2" : "dkh 7/27/2014 17:38",
"installTravisTode2" : "dkh 7/28/2014 20:52",
"stoneName" : "dkh 7/18/2014 15:45",
"stoneName:" : "dkh 7/19/2014 10:08" } }
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ activate
self printHelp.
^ self exitFailure: 'Missing stone name' ].
self newExtent.
Transcript cr
self shouldRemoveTranlogs
ifTrue: [ self removeTranlogs ].
self exitSuccess
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
activations
actions
newExtent
| stoneDirectory extentFile |
Transcript
Expand All @@ -16,4 +16,3 @@ newExtent
tab;
show: 'Finished copying new extent for ' , self stoneName;
cr.
self exitSuccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
actions
removeTranlogs
Transcript
cr;
show: 'Removing tranlogs for ' , self stoneName.
self removeTranlogs: self tranlogsHome.
Transcript
cr;
tab;
show: 'Finished removing tranlogs for ' , self stoneName;
cr.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
shouldRemoveTranlogs
^ true
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"commandName" : "dkh 7/19/2014 07:54",
"description" : "dkh 7/19/2014 07:54" },
"instance" : {
"activate" : "dkh 2/17/2015 13:58",
"activate" : "dkh 3/20/2015 18:27",
"gsVers" : "dkh 7/19/2014 07:59",
"newExtent" : "dkh 3/19/2015 12:11",
"newExtent" : "dkh 3/20/2015 18:27",
"removeTranlogs" : "dkh 3/20/2015 18:26",
"shouldRemoveTranlogs" : "dkh 3/20/2015 18:15",
"snapshotFile" : "dkh 3/20/2015 11:06",
"stoneInfo" : "dkh 7/19/2014 07:58" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Usage: newExtentForBackup [ --help] <stone-name> <snapshot-file-path>
<stone-name> name of the stone to be created
<snapshot-file-path> Path to extent snapshot file to be used to
restore the stone.

Documentation:
Copy a fresh extent file to the given stones extent directory, in preparation for for a restore from backup.

Tranlog files are not removed, so that they can be used for recovery.

See http://downloads.gemtalksystems.com/docs/GemStone64/3.2.x/GS64-SysAdmin-3.2/GS64-SysAdmin-3.2.htm for more info.

Examples:
newExtent --help
newExtent sample $GS_HOME/gemstone/snapshots
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
commandName
^ 'newExtentForRecovery'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
description
^ 'Copy a fresh extent file to the given stones extent directory, in preparation for for a restore from backup (i.e., tranlogs are not removed).'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
shouldRemoveTranlogs
^ false
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"class" : {
"commandName" : "dkh 3/20/2015 18:24",
"description" : "dkh 3/20/2015 18:22" },
"instance" : {
"shouldRemoveTranlogs" : "dkh 3/20/2015 18:20" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "GsDevKit-CommandLine",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "dkh 3/20/2015 18:24",
"instvars" : [
],
"name" : "GsDevKitNewExtentForRecoveryCommandLineHandler",
"pools" : [
],
"super" : "GsDevKitNewExtentCommandLineHandler",
"type" : "normal" }

Large diffs are not rendered by default.

0 comments on commit 5bec1a7

Please sign in to comment.