ovsdb: Add documentation for ovsdb-server and ovsdb-tool programs.
[cascardo/ovs.git] / ovsdb / ovsdb-tool.1.in
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .\" -*- nroff -*-
8 .TH ovsdb\-tool 1 "November 2009" "Open vSwitch" "Open vSwitch Manual"
9 .ds PN ovsdb\-tool
10 .
11 .SH NAME
12 ovsdb\-tool \- Open vSwitch database management utility
13 .
14 .SH SYNOPSIS
15 \fBovsdb\-tool \fR[\fIoptions\fR] \fBcreate\fI db schema\fR
16 .br
17 \fBovsdb\-tool \fR[\fIoptions\fR] \fBquery\fI db transaction\fR
18 .br
19 \fBovsdb\-tool \fR[\fIoptions\fR] \fBtransact\fI db transaction\fR
20 .br
21 \fBovsdb\-tool help\fR
22 .so lib/vlog-syn.man
23 .so lib/common-syn.man
24 .
25 .SH DESCRIPTION
26 The \fBovsdb\-tool\fR program is a command-line tool for managing Open
27 vSwitch database (OVSDB) files.  It does not interact directly with
28 running Open vSwitch database servers (instead, use
29 \fBovsdb\-client\fR).
30 .
31 .SS "Basic Commands"
32 .IP "\fBcreate\fI db schema\fR"
33 Reads an OVSDB schema from the file named \fIschema\fR and creates a
34 new OVSDB database file named \fIdb\fR using that schema.  The new
35 database is initially empty.  This command will not overwrite an
36 existing \fIdb\fR.
37 .IP
38 \fIschema\fR must contain an OVSDB schema in JSON format.  Refer to
39 the OVSDB specification for details.
40 .
41 .IP "\fBquery\fI db transaction\fR"
42 Opens \fIdb\fR, executes \fItransaction\fR on it, and prints the
43 results.  The \fItransaction\fR must be a JSON array in the format of
44 the \fBparams\fR array for the JSON-RPC \fBtransact\fR method, as
45 described in the OVSDB specification.
46 .IP
47 The \fIdb\fR is opened for read-only access, so this command may
48 safely run concurrently with other database activity, including
49 \fBovsdb-server\fR and other database writers.  The \fItransaction\fR
50 may specify database modifications, but these will have no effect on
51 \fIdb\fR.
52 .
53 .IQ "\fBtransact\fI db transaction\fR"
54 Opens \fIdb\fR, executes \fItransaction\fR on it, prints the results,
55 and commits any changes to \fIdb\fR.  The \fItransaction\fR must be a
56 JSON array in the format of the \fBparams\fR array for the JSON-RPC
57 \fBtransact\fR method, as described in the OVSDB specification.
58 .IP
59 The \fIdb\fR is opened and locked for read/write access, so this
60 command will fail if the database is opened for writing by any other
61 process, including \fBovsdb-server\fR(1).  Use \fBovsdb\-client\fR(1),
62 instead, to write to a database that is served by
63 \fBovsdb-server\fR(1).
64 .
65 .SH OPTIONS
66 .SS "Logging Options"
67 .so lib/vlog.man
68 .SS "Other Options"
69 .so lib/common.man
70 .SH "SEE ALSO"
71 .
72 \fBovsdb\-server\fR(1),
73 \fBovsdb\-client\fR(1),
74 and the OVSDB specification.