3.4. Saving the Data


VoltDB Home » Documentation » Using VoltDB

3.4. Saving the Data

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 can save this information to disk through the use of command logs and snapshots, so use of these features is strongly encouraged.

  • Command logging provides the most complete data durability for VoltDB and is enabled by default in the VoltDB Enterprise Edition. Command logging works automatically by saving a record of every transaction. These logs can then be replayed if the database stops for any reason.

  • Snapshots, on the other hand, provide a point-in-time copy of the database contents written to disk. You can create snapshots manually with the voltadmin save command, you can enable periodic (also known as automatic) snapshots, or you can save a final snapshot when you shutdown the database using the voltadmin shutdown --save command. Snapshots are restored when the database restarts, but only take you back to the state of the database at the time the last snapshot was saved.

To learn more about using command logging see Chapter 14, Command Logging and Recovery. To learn more about how to save and restore snapshots of the database, see Chapter 13, Saving & Restoring a VoltDB Database.