Overview
The greptime
command can start/stop GreptimeDB and pass configuration options.
Install the Greptime CLI
The Greptime CLI is bundled with the GreptimeDB binary.
If you start GreptimeDB using the binary file as described in the installing GreptimeDB documentation,
you can execute the ./greptime
command from within the GreptimeDB directory.
For convenience, if you prefer to run commands using greptime
instead of ./greptime
,
consider moving the CLI binary to your system's bin
directory or adding the binary's path to your PATH
environment variable.
If you deployed GreptimeDB in Kubernetes, you can access the greptime command line through the frontend pod. Use the following command to enter the pod:
kubectl exec -it <greptimedb-frontend-pod> -n <namespace> -- /bin/bash
Once inside the pod, you can run greptime help
to see all available commands.
CLI Options
The help
command lists all available commands and options of greptime
.
$ greptime help
Usage: greptime [OPTIONS] <COMMAND>
Commands:
datanode Start datanode service
flownode Start flownode service
frontend Start frontend service
metasrv Start metasrv service
standalone Run greptimedb as a standalone service
cli Execute the cli tools for greptimedb
help Print this message or the help of the given subcommand(s)
Options:
--log-dir <LOG_DIR>
--log-level <LOG_LEVEL>
-h, --help Print help
-V, --version Print version
Global options
Option | Description |
---|---|
-h /--help | Print help information |
-V /--version | Print version information |
--log-dir <LOG_DIR> | The logging directory, default is ./greptimedb_data/logs |
--log-level <LOG_LEVEL> | The logging level, default is info |
Subcommands
Upgrade GreptimeDB version
Please refer to the upgrade steps