Can the data repository stop or start be scripted

Document ID : KB000093243
Last Modified Date : 09/11/2018
Show Technical Document Details
The CAPM docops section on how to restart the data repository (Vertica nodes) details the process which includes using the administration tool (adminTools) which is menu driven:
However, sometimes the interface or accessibility requires this be done using the command line. For example, to script this for use as part of system patching tasks.
Is there a way to restart the Vertica cluster via a script? 
CAPM 3.x on linux

There is one caveat that you need to be aware of using the command line with Vertica. Sometimes, if there is a problem starting the db, adminTools will offer some choices, like start from last good epoch. When you use the command line, those options are not seen and the db just fails.

With that in mind, here are some commands:

Replace <DBPASS> with your password, if different.

To start the DB from the root user account:

su - dradmin -c "/opt/vertica/bin/adminTools -t start_db -d drdata -p <DBPASS> -i";

To stop the DB:

su - dradmin -c "/opt/vertica/bin/adminTools -t stop_db -d drdata -p <DBPASS> -i";

To get the status of the DB:

su - dradmin -c "/opt/vertica/bin/adminTools -t view_cluster";

Additional Information: