3.4. Stopping a VoltDB Database

Documentation

VoltDB Home » Documentation » Using VoltDB

3.4. Stopping a VoltDB Database

Once the VoltDB database is up and running, you can shut it down by stopping the VoltDB server processes on each cluster node. However, it is easier to stop the database as a whole on the entire cluster with a single command. You can do this either programmatically with the @Shutdown system procedure (from any node) or interactively with the voltadmin shutdown command. You do not have to issue commands on each node. For example, entering the following command without specifying a host server will shut down the database cluster the current system is part of.

$ voltadmin shutdown

To shutdown a remote database running on servers of a different cluster, use the --host, --user, and --password arguments to access the remote database. For example, the following command shuts down the VoltDB database that includes the server zeus:

$ voltadmin shutdown --host=zeus

Because VoltDB is an in-memory database, once the database server process stops, the database schema and the data itself are removed from memory. However, VoltDB saves the information to disk. To retain the schema and data across sessions, VoltDB provides database snapshots and command logging. A snapshot is a point-in-time copy of the database contents written to disk. Command logging provides, in addition to periodic snapshots, a log of all stored procedures that are initiated at each partition. Command logging is enabled by default to ensure your database is not lost. To learn more about how to save and restore snapshots of the database, see Chapter 13, Saving & Restoring a VoltDB Database. To learn more about using command logging and recovery to save and reload the database automatically, see Chapter 14, Command Logging and Recovery.

You can pause the database using the @Pause system procedure or voltadmin pause to restrict clients from accessing it while you perform changes in administration mode. You resume the database using the @Resume system procedure or the voltadmin resume command. See the VoltDB Administrator's Guide for more about modes of operation.

>