gpsuspend_help 3.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
COMMAND NAME:  gpsuspend

Pause and resume a running Greenplum Database

******************************************************
SYNOPSIS
******************************************************

gpsuspend --pause [--batchsize batchsize] [--noninteractive]

gpsuspend --resume --pausefile pausefile_name [--batchsize batchsize]

gpsuspend -? | -h | --help

Prerequisites:

* You are logged in as the Greenplum Database superuser (gpadmin).

* You are on the machine that is running the master database

* You are not running --pause on an already paused database


*******************************************************
DESCRIPTION
*******************************************************

The gpsuspend utility can pause a running instance of Greenplum Database.

The utility is first run in 'pause' mode which will pause the database.
In 'pause' mode, the successful output of the command will print the 
location of a generated pausefile which can be used to restore the
system state.

In 'resume' mode you must pass the location of the pause file which describes
the list of segment hosts in a Greenplum database and can be used to resume
the paused system

By default the utility is run in interactive mode.  In interactive mode
The utitility will stop after pausing the database and wait for user entry.
At this point the database is paused.  When the administrator is ready to 
resume the database they can use the prompt to enter 'resume' and the database
will be resumed. To disable interactive mode and run 'pause' and 'resume' 
independtly use the --noninteractive option with --pause.

The utility pauses the database using unix signals STOP and CONT.  If you want
to confirm that the database is paused you can use gpssh and enter the command
ps ax | grep postgres | grep -v grep.  This will list all postgres processes
on your cluster and the run state.  All processes should be in a STOP state.
Also note, the order in which the processes are paused and resumed is important.
First the master postgres instance is paused and then the segments.  Also within
a postgres instance, first the postmaster process is paused and then its children.


********************************************************
OPTIONS
********************************************************


-h (help)

Displays the online help.

--pause

Sets the utility into 'pause' mode

--resume

Sets the utility into 'resume' mode

--pausefile <pausefilename>

This option is used in 'resume' mode for the utility to know the 
location of the segments while the database is paused and inaccessible.
The file is generated to the GPHOME directory during 'pause' mode.

--noninteractive

This option will disable the default interactive mode.

-B <batch_size>

The number of worker threads for connecting to segment hosts.
By making this number higher, more parallel ssh connections will be
made in order to complete the job faster.

--verbose | -v (verbose) 

Verbose debugging output.

-? | h (help)

Displays the online help.


*********************************************************
EXAMPLES
*********************************************************

Pause a running Greenplum database:

$ gpsuspend --pause --noninteractive


Resume a running Greenplum database using a pausefile:

$ gpsuspend --resume --pausefile /home/gpadmin/greenplum-db/./gp_pause.20091113.2158.dat

Running in interactive mode:

$ gpsuspend --pause
Database is paused. When you are ready, type a command below to resume or quit.
 quit|resume (default=quit):
$ resume
--done--


**********************************************************
SEE ALSO
**********************************************************

gpstart, gpstop