tarantool command-line options
tarantool is the Tarantool database and application server.
This command can be used for different purposes, for example, running a single Tarantool instance or starting an external coordinator used for a supervised failover.
The tarantool command also provides additional options that might be helpful for development purposes.
Note
The tt utility is the recommended way to start Tarantool instances. Learn more from Starting and stopping instances.
Below is the syntax for starting a Tarantool instance configured in a file:
$ tarantool [OPTION ...] --name INSTANCE_NAME --config CONFIG_FILE_PATH
The command below starts router-a-001 configured in the config.yaml file:
$ tarantool --name router-a-001 --config config.yaml
-
-h,--help¶ Print an annotated list of all available options and exit.
-
--help-env-list¶ Since: 3.0.0.
Show a list of environment variables that can be used to configure Tarantool.
-
--failover¶ Since: 3.1.0.
Enterprise Edition
This option is supported by the Enterprise Edition only.
Start an external coordinator used for a supervised failover.
-
--force-recovery¶ Since: 3.0.0.
Try to start an instance if there is an error while reading a corrupted snapshot or write-ahead log file during the recovery process:
- For a corrupted snapshot file – at the instance start.
- For a corrupted write-ahead log file – at the instance start or when applying an update at a replica.
With this option enabled, Tarantool skips invalid records, reads as much data as possible, and lets the process finish with a warning. When the instance has started, call box.snapshot() to make a new snapshot so that the corrupted snapshots or write-ahead logs aren’t used for recovery anymore.
You can also enable force recovery using the
TT_FORCE_RECOVERYenvironment variable.TT_FORCE_RECOVERYhas a lower priority than the--force-recoveryoption.Example on GitHub: force_recovery
-
-v,-V,--version¶ Print the product name and version.
Example
$ tarantool --version Tarantool Enterprise 3.0.0-beta1-2-gcbb569b4c-r607-gc64 Target: Linux-x86_64-RelWithDebInfo ...
In this example:
3.0.0is a Tarantool version. Tarantool follows semantic versioning, which is described in the Tarantool release policy section.Targetis the platform Tarantool is built on. Platform-specific details may follow this line.
-
-c,--configPATH¶ Since: 3.0.0.
Set a path to a YAML configuration file. You can also configure this value using the
TT_CONFIGenvironment variable.
-
-n,--nameINSTANCE¶ Since: 3.0.0.
Set the name of an instance to run. You can also configure this value using the
TT_INSTANCE_NAMEenvironment variable.
-
-i¶ Enter an interactive mode.
Example
$ tarantool -i
-
-eEXPR¶ Execute the ‘EXPR’ string. See also: lua man page.
Example
$ tarantool -e 'print("Hello, world!")' Hello, world!
-
-lNAME¶ Require the ‘NAME’ library. See also: lua man page.
Example
$ tarantool -l luatest.coverage script.lua
-
-jcmd¶ Perform a LuaJIT control command. See also: Command Line Options.
Example
$ tarantool -j off app.lua
-
-b...¶ Save or list bytecode. See also: Command Line Options.
Example
$ tarantool -b test.lua test.out
-
-dSCRIPT¶ Activate a debugging session for ‘SCRIPT’. See also: luadebug.lua.
Example
$ tarantool -d app.lua
-
--¶ Stop handling options. See also: lua man page.
-
-¶ Stop handling options and execute the standard input as a file. See also: lua man page.