Skip to content

Commit 265b90d

Browse files
authored
DOC-8718 -- Sync Gateway command line flags not fully documented (#525)
https://issues.couchbase.com/browse/DOC-8718
1 parent 6dde305 commit 265b90d

File tree

1 file changed

+82
-65
lines changed

1 file changed

+82
-65
lines changed

modules/ROOT/pages/command-line-options.adoc

Lines changed: 82 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,40 @@ For example, `-bucket=db`, or as a following item on the command line, for examp
3434

3535

3636
[#option-fmt]
37-
.Command line option format
37+
.Command line options
3838
====
39+
40+
[{tabs}]
41+
=====
42+
43+
Format::
44+
+
45+
--
46+
When specifying command-line options use this format:
47+
3948
[source,bash]
4049
----
41-
sync_gateway [command-line options]
50+
sync_gateway [ -{option} ]
4251
----
52+
53+
<.> Seperate multiple options by a comma or a space
54+
55+
--
56+
57+
List CLI Arguments::
58+
+
59+
--
60+
You can check the latest position by navigating to the folder containing the Sync Gateway executable and using:
61+
62+
[source,bash]
63+
----
64+
$ ./sync_gateway -help <.>
65+
----
66+
67+
<.> This command lists all Sync Gateway's current command line arguments
68+
--
69+
70+
=====
4371
====
4472
// Here we use lower camel case.
4573

@@ -48,103 +76,92 @@ sync_gateway [command-line options]
4876
The following command-line options can be used when starting Sync Gateway see <<cmd-opts>>
4977

5078
.*Deprecation Notice*
51-
WARNING: The `-bucket` command line option is deprecated at Release 2.7 and will be removed following release 2.8. +
79+
WARNING: The `-bucket` command line option, deprecated at Release 2.7, will be removed following release 2.8. +
5280
Use the JSON configuration file option `bucket` -- see {configuration-properties--xref--databases-bucket}.
5381

5482
[#cmd-opts]
5583
.Available command-line options
56-
[#cmd-opts,cols="1,1,2"]
84+
[#cmd-opts,cols="^3m,3,4a"]
5785
|===
5886
|Option |Default |Description
5987

60-
|`‑adminInterface`
61-
|`127.0.0.1:4985`
88+
|‑adminInterface
89+
|127.0.0.1:4985
6290
|Port or TCP network address (IP address and the port) that the Admin REST API listens on.
6391

64-
|`-bucket`
65-
|`sync_gateway`
66-
|*_Deprecated_* Name of the Couchbase Server bucket.
92+
|-bucket
93+
|sync_gateway
94+
|*_Deprecated_* Name of the Couchbase Server bucket. +
95+
Instead use {configuration-properties--xref--databases-bucket}
96+
97+
|-cacertpath
98+
|none
99+
|Root CA certificate path
100+
101+
|-certpath
102+
|none
103+
|Client certificate path
67104

68-
|`-dbname`
69-
|`sync_gateway`
105+
|-configServer
106+
|none
107+
|URL of server that can return database configs
108+
109+
|-dbname
110+
|sync_gateway
70111
|Name of the Couchbase Server database to serve through the Public REST API.
71112

72-
|`-defaultLogFilePath`
113+
|-defaultLogFilePath
73114
|none
74115
|Path to log files, as a fallback default value when `logFilePath` is not specified.
75116
This option is generally used in service scripts.
76117

77-
|`-help`
118+
|-deploymentID
119+
|none
120+
|Customer/project identifier for stats reporting
121+
122+
|--help
78123
|none
79124
|Lists the available options and exits.
80125

81-
|`-interface`
82-
|`:4984`
126+
|-interface
127+
|:4984
83128
|Port or TCP network address (IP address and the port) that the Public REST API listens on.
84129

85-
|`-log`
86-
|`HTTP`
87-
|Comma-separated list of log keywords to enable.
88-
The log keyword `HTTP` is enabled by default, which means that HTTP requests and error responses are always logged.
89-
Omitting `HTTP` from your list does not disable HTTP logging. HTTP logging can be disabled through the Admin API.
130+
|-keypath
131+
|none
132+
|Client certificate key path
133+
134+
|-log
135+
|HTTP
136+
|A comma-separated list of log keywords to be enabled. +
137+
The log keyword `HTTP` is enabled by default, which means that HTTP requests and error responses are always logged. +
138+
Omitting `HTTP` from your list does not disable HTTP logging. You can disable HTTP logging using the Admin API.
90139

91-
|`-logFilePath`
140+
|-logFilePath
92141
|none
93142
|Path to log files.
94143

95-
|`-pool`
96-
|`default`
144+
|-pool
145+
|default
97146
|Name of the Couchbase Server pool in which to find buckets.
98147

99-
|`-pretty`
100-
|`false`
148+
|-pretty
149+
|false
101150
|Pretty-print JSON responses to improve readability.
102151
This is useful for debugging, but reduces performance.
103152

104-
|`-url`
105-
|`walrus:`
106-
|URL of the database server.
107-
(*Deprecated*) An HTTP URL implies Couchbase Server.
108-
A `walrus:` URL implies the built-in Walrus database.
109-
A combination of a Walrus URL and a file-style URI (for example, `walrus:///tmp/walrus`) implies the built-in Walrus database and persisting the database to a file.
153+
|-profileInterface
154+
|
155+
|Address to bind the profile interface to
110156

111-
|`-verbose`
157+
|-url
158+
m|DefaultServer
159+
|The URL of the database server
160+
161+
|-verbose
112162
|Non-verbose logging
113163
|Logs more information about requests.
114164
|===
115165

116-
[[_examples]]
117-
=== Examples
118-
119-
The following command does not include any parameters and just uses the default values.
120-
It connects to the bucket named `sync_gateway` in the pool named `default` of the built-in Walrus database.
121-
It is served from port 4984, with the Admin interface on port 4985.
122-
123-
[source,bash]
124-
----
125-
$ sync_gateway
126-
----
127-
128-
The following command creates an ephemeral, in-memory Walrus database, served as `db`, and specifies use of pretty-printed JSON responses.
129-
Because Walrus is the default database, the option `-url` could be omitted.
130-
131-
[source,bash]
132-
----
133-
$ sync_gateway -url=walrus: -bucket=db -pretty
134-
----
135-
136-
The following command starts Sync Gateway and specifies the address of a Couchbase Server instance (instead of using the default database server, which is Walrus):
137-
138-
[source,bash]
139-
----
140-
$ ./sync_gateway -url http://cbserver:8091
141-
----
142-
143-
The following command accomplishes the same things as the prior command, persists the Walrus database to a file named `/tmp/walrus/db.walrus`, and turns on additional logging for the log keys `HTTP+` and `CRUD`.
144-
145-
[source,bash]
146-
----
147-
$ sync_gateway -url=walrus:///tmp/walrus -bucket=db -log=HTTP+,CRUD
148-
----
149166

150167
include::partial$block-related-content-api.adoc[]

0 commit comments

Comments
 (0)