1TARANTOOLCTL(1) Tarantool instances control TARANTOOLCTL(1)
2
3
4
6 tarantoolctl - a utility to control Tarantool instances
7
9 tarantoolctl COMMAND [INSTANCE] [FILE] [URI] [OPTIONS...]
10
12 tarantoolctl may be used to introspect and control the state of
13 Tarantool instances.
14
15 The "INSTANCE" represents the name of an instance file.
16
18 The following commands are understood:
19
20 start INSTANCE
21 Start the Tarantool instance specified on the command line if the
22 instance is not running. This does nothing if an instance is
23 running.
24
25 stop INSTANCE
26 Stop the Tarantool instance specified on the command line if the
27 instance is running. This does nothing if an instance is not
28 running.
29
30 status INSTANCE
31 Show status of the Tarantool instance specified on the command line
32 (started/stopped). If pid file exists and an alive control socket
33 exists, the return code is 0. Otherwise, the return code is not 0.
34 Reports typical problems to stderr (e.g. pid file exists and
35 control socket does not).
36
37 restart INSTANCE
38 Stop and start the Tarantool instance specified on the command line
39 if the instance is running. This does nothing if an instance is not
40 running.
41
42 logrotate INSTANCE
43 Rotate logs of the Tarantool instance specified on the command line
44 if the instance is running. This works only if logging-into-file is
45 enabled in the instance file ("box.cfg{log=...}" parameter).
46 Pipe/syslog make no effect.
47
48 check INSTANCE
49 Check if there are syntax errors in the instance script of the
50 Tarantool instance specified on the command line.
51
52 enter INSTANCE
53 Enter the interactive console of the Tarantool instance specified
54 on the command line.
55
56 eval INSTANCE FILE
57 COMMAND | tarantoolctl eval INSTANCE
58 Evaluate a local file on the Tarantool instance specified on the
59 command line if the instance is running. This does nothing if an
60 instance is not running.
61
62 connect URI
63 COMMAND | tarantoolctl connect URI
64 Connect on an admin-console port to the Tarantool instance with the
65 URI specified on the command line. This supports both TCP/Unix
66 sockets.
67
68 cat FILE... [--space=space_no...] [--show-system] [--from=from_lsn]
69 [--to=to_lsn] [--replica=replica_id]
70 Print into stdout the contents of .snap/.xlog files specified on
71 the command line.
72
73 play URI FILE... [--space=space_no...] [--show-system]
74 [--from=from_lsn] [--to=to_lsn] [--replica=replica_id]
75 Play the contents of .snap/.xlog files to another Tarantool
76 instance with URI specified on the command line.
77
79 The following options are understood:
80
81 --space=space_no
82 Filter the output by space number. May be passed more than once.
83
84 --show-system
85 Show/play the contents of system spaces.
86
87 --from=from_lsn
88 Show/play operations starting from the given lsn.
89
90 --to=to_lsn
91 Show/play operations ending with the given lsn.
92
93 --replica=replica_id
94 Filter the output by replica ID. May be passed more than once.
95
97 The file with system-wide defaults for tarantoolctl is installed in
98 "/etc/default/tarantool". This file is used when tarantoolctl is
99 invoked by root. When invoked by a local user, tarantoolctl first looks
100 for its defaults file in the current directory ("$PWD/.tarantoolctl"),
101 and then in the current user's home directory
102 ("$HOME/.config/tarantool/tarantool"). If not found, tarantoolctl
103 falls back to built-in defaults:
104
105 default_cfg = {
106 pid_file = "/var/run/tarantool",
107 wal_dir = "/var/lib/tarantool",
108 memtx_dir = "/var/lib/tarantool",
109 vinyl_dir = "/var/lib/tarantool",
110 log = "/var/log/tarantool",
111 username = "tarantool",
112 }
113 instance_dir = "/etc/tarantool/instances.enabled"
114
115 Most of these parameters are similar to those in "box.cfg{}":
116
117 pid_file
118 Directory for the pid file and control-socket file; tarantoolctl
119 will add "/instance_name" to the directory name.
120
121 wal_dir
122 Directory for write-ahead *.xlog files; tarantoolctl will add
123 "/instance_name" to the directory name.
124
125 memtx_dir
126 Directory for snapshot *.snap files; tarantoolctl will add
127 "/instance_name" to the directory name.
128
129 vinyl_dir
130 Directory for vinyl files; tarantoolctl will add "/instance_name"
131 to the directory name.
132
133 log The place where the application log will go; tarantoolctl will add
134 "/instance_name.log" to the name.
135
136 username
137 The user that runs the Tarantool instance. This is the operating-
138 system user name rather than the Tarantool-client user name.
139 Tarantool will change its effective user to this user after
140 becoming a daemon.
141
142 instance_dir
143 The directory where all instance files for this host are stored.
144 Put instance files in this directory, or create symbolic links.
145
146 As a full-featured example, you can take "example.lua" script that
147 ships with Tarantool and defines all configuration options.
148
150 On success, 0 is returned, a non-zero failure code otherwise.
151
153 tarantool(1), Tarantool manual at http://tarantool.org/doc/
154
156 Copyright (C) 2010-2017 Tarantool AUTHORS: please see AUTHORS file.
157
158
159
160--name=tarantoolctl 2019-07-27 TARANTOOLCTL(1)