Command Line Utilities

Use the snappy command-line utility to launch SnappyData utilities.

To display a full list of snappy commands and options:

./bin/snappy --help

The command form to display a particular utility's usage is:

./bin/snappy <utility> --help

With no arguments, snappy starts an interactive SQL command shell:


To specify a system property for an interactive `snappy` session, you must define the JAVA_ARGS environment variable before starting `snappy`. For example, `snappy` uses the `snappy.history` system property to define the file that stores a list of the commands that are executed during an interactive session. To change this property, you would define it as part of the JAVA_ARGS variable:

$ export JAVA_ARGS="-Dsnappy.history=/Users/user1/snappystore-history.sql"
$ snappy

To launch and exit a snappy utility (rather than start an interactive snappy shell) use the syntax:

./bin/snappy <utility> <arguments for specified utility>

To specify a system property when launching a snappy utility, use -J-Dproperty_name=property_value argument.

In addition to launching various utilities provided with SnappyData, when launched without any arguments, snappy starts an interactive command shell that you can use to connect to a SnappyData system and execute various commands, including SQL statements.

  • backup and restore Creates a backup of operational disk stores for all members running in the distributed system. Each member with persistent data creates a backup of its own configuration and disk stores.

  • compact-all-disk-stores Performs online compaction of SnappyData disk stores.

  • compact-disk-store Performs offline compaction of a single SnappyData disk store.

  • revoke-missing-disk-store Instruct SnappyData members to stop waiting for a disk store to become available.

  • run Connects to a SnappyData distributed system and executes the contents of a SQL command file. All commands in the specified file must be compatible with the interactive SnappyData shell.

  • version Prints information about the SnappyData product version