3.5. Stopping the Database


VoltDB Home » Documentation » Administrator's Guide

3.5. Stopping the Database

How you choose to stop a VoltDB depends on what features you have enabled. For example, if you do not have any durability features enabled (such as auto snapshots or command logging), it is strongly recommended that you pause the database and take a manual snapshot before shutting down, so you preserve the data across sessions.

If you have command logging enabled, a manual snapshot is not necessary. However, it is still a good idea to perform an orderly shutdown when stopping the database to ensure that all active client queries have a chance to complete and return their results (and no new queries start) before the shutdown occurs.

To perform an orderly shutdown you can use the voltadmin shutdown command:

$ voltadmin shutdown

As with all voltadmin commands, you can use them remotely by specifying one of the cluster servers on the command line:

$ voltadmin shutdown --host=voltsvr2

If security is enabled, you will also need to specify a username and password for a user with admin permissions:

$ voltadmin shutdown --host=voltsvr2 -u root -p Suda51

Finally, if you are not using the durability features of automatic snapshots or command logging, you should perform a manual snapshot using the save command after pausing and before shutting down. Use the --blocking flag to ensure the snapshot completes before the shutdown occurs:

$ voltadmin pause --wait
$ voltadmin save --blocking /tmp/voltdb backup
$ voltadmin shutdown