Restarting a VoltDB database is different than starting it for the first time. How you restart the database depends on what durability features were in effect previously.
If you just use the voltdb create command, you create a new, empty database. Because VoltDB keeps its data in memory, to return the database to its last known state — including its content — you need to restore the data from a saved copy.
If you are using automatic snapshots or command logging, VoltDB can automatically reinstate the data when you use the voltdb recover command:
$ voltdb recover --deployment=deployment.xml \ --host=voltsvr1 \ --license=~/license.xml
Because the schema is saved with the data, you do not need to specify an application catalog when recovering a previous database session. However, just as when starting a database for the first time, you must invoke the recover command on all nodes of the cluster before the database can start,
When you recover a VoltDB database, the cluster performs the same initial coordination activities as when creating a new database: the host node facilitates establishing a quorum and ensures all nodes connect. Then the database servers restore the most recent snapshot plus (if command logging is enabled) the last logged transactions. Once all data is restored, the database enables client access.
If you are not using automatic snapshots or command logging, you must restore the last snapshot manually. You do this with the following procedure:
Start a new database using the voltdb create command on each server as described in Section 3.2, “Starting the Database”.
Use the voltadmin pause, restore, and resume commands to pause the database, restore the last snapshot, and then resume client activity.
For example, if the last snapshot was saved in
/tmp/voltdb using the unique ID
backup, you can restore the data with the following commands:
$ voltadmin pause $ voltadmin restore /tmp/voltdb backup $ voltadmin resume