]> git.proxmox.com Git - mirror_ovs.git/blame - ovsdb/ovsdb-tool.1.in
ofp-print: Avoid double space before "actions" for catch-all flows.
[mirror_ovs.git] / ovsdb / ovsdb-tool.1.in
CommitLineData
f7f62235
BP
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
12ovsdb\-tool \- Open vSwitch database management utility
13.
14.SH SYNOPSIS
15\fBovsdb\-tool \fR[\fIoptions\fR] \fBcreate\fI db schema\fR
16.br
8159b984
BP
17\fBovsdb\-tool \fR[\fIoptions\fR] \fBcompact \fIdb \fR[\fItarget\fR]
18.br
19\fBovsdb\-tool \fR[\fIoptions\fR] \fBconvert\fI db schema
20\fR[\fItarget\fR]
21.br
403e3a25
BP
22\fBovsdb\-tool \fR[\fIoptions\fR] \fBneeds\-conversion\fI db schema\fR
23.br
8159b984
BP
24\fBovsdb\-tool \fR[\fIoptions\fR] \fBdb\-version\fI db\fR
25.br
26\fBovsdb\-tool \fR[\fIoptions\fR] \fBschema\-version\fI schema\fR
27.br
6aa09313
BP
28\fBovsdb\-tool \fR[\fIoptions\fR] \fBdb\-cksum\fI db\fR
29.br
30\fBovsdb\-tool \fR[\fIoptions\fR] \fBschema\-cksum\fI schema\fR
31.br
f7f62235
BP
32\fBovsdb\-tool \fR[\fIoptions\fR] \fBquery\fI db transaction\fR
33.br
34\fBovsdb\-tool \fR[\fIoptions\fR] \fBtransact\fI db transaction\fR
35.br
4e312e69 36\fBovsdb\-tool \fR[\fIoptions\fR] [\fB\-m\fR | \fB\-\-more\fR]... \fBshow\-log\fI db\fR
722f6301 37.br
f7f62235
BP
38\fBovsdb\-tool help\fR
39.so lib/vlog-syn.man
40.so lib/common-syn.man
41.
42.SH DESCRIPTION
43The \fBovsdb\-tool\fR program is a command-line tool for managing Open
44vSwitch database (OVSDB) files. It does not interact directly with
45running Open vSwitch database servers (instead, use
46\fBovsdb\-client\fR).
47.
48.SS "Basic Commands"
49.IP "\fBcreate\fI db schema\fR"
50Reads an OVSDB schema from the file named \fIschema\fR and creates a
51new OVSDB database file named \fIdb\fR using that schema. The new
52database is initially empty. This command will not overwrite an
53existing \fIdb\fR.
54.IP
55\fIschema\fR must contain an OVSDB schema in JSON format. Refer to
56the OVSDB specification for details.
57.
1e19e50e
BP
58.IP "\fBcompact\fI db \fR[\fItarget\fR]"
59Reads \fIdb\fR and writes a compacted version. If \fItarget\fR is
60specified, the compacted version is written as a new file named
61\fItarget\fR, which must not already exist. If \fItarget\fR is
62omitted, then the compacted version of the database replaces \fIdb\fR
63in-place.
64.
65.IP "\fBconvert\fI db schema \fR[\fItarget\fR]"
66Reads \fIdb\fR, translating it into to the schema specified in
67\fIschema\fR, and writes out the new interpretation. If \fItarget\fR
68is specified, the translated version is written as a new file named
69\fItarget\fR, which must not already exist. If \fItarget\fR is
70omitted, then the translated version of the database replaces \fIdb\fR
71in-place.
72.IP
73This command can do simple ``upgrades'' and ``downgrades'' on a
74database's schema. The data in \fIdb\fR must be valid when
75interpreted under \fIschema\fR, with only one exception: data in
76\fIdb\fR for tables and columns that do not exist in \fIschema\fR are
77ignored. Columns that exist in \fIschema\fR but not in \fIdb\fR are
78set to their default values. All of \fIschema\fR's constraints apply
79in full.
80.
403e3a25
BP
81.IP "\fBneeds\-conversion\fI db schema\fR"
82Reads the schema embedded in \fIdb\fR and the standalone schema in
83\fIschema\fR and compares them. If the schemas are the same, prints
84\fBno\fR on stdout; if they differ, print \fByes\fR.
85.
8159b984 86.IP "\fBdb\-version\fI db\fR"
6aa09313
BP
87.IQ "\fBschema\-version\fI schema\fR"
88Prints the version number in the schema embedded within the database
89\fIdb\fR or in the standalone schema \fIschema\fR on stdout. A schema
90version number has the form \fIx\fB.\fIy\fB.\fIz\fR. See
91\fBovs\-vswitchd.conf.db\fR(5) for details.
8159b984
BP
92.IP
93Schema version numbers and Open vSwitch version numbers are
94independent.
95.IP
6aa09313
BP
96If \fIschema\fR or \fIdb\fR was created before schema versioning was
97introduced, then it will not have a version number and this command
98will print a blank line.
8159b984 99.
6aa09313
BP
100.IP "\fBdb\-cksum\fI db\fR"
101.IQ "\fBschema\-cksum\fI schema\fR"
102Prints the checksum in the schema embedded within the database
103\fIdb\fR or of the standalone schema \fIschema\fR on stdout.
8159b984 104.IP
de66aa57
BP
105If \fIschema\fR or \fIdb\fR was created before schema checksums were
106introduced, then it will not have a checksum and this command
6aa09313 107will print a blank line.
8159b984 108.
f7f62235
BP
109.IP "\fBquery\fI db transaction\fR"
110Opens \fIdb\fR, executes \fItransaction\fR on it, and prints the
111results. The \fItransaction\fR must be a JSON array in the format of
112the \fBparams\fR array for the JSON-RPC \fBtransact\fR method, as
113described in the OVSDB specification.
114.IP
115The \fIdb\fR is opened for read-only access, so this command may
116safely run concurrently with other database activity, including
4e312e69 117\fBovsdb\-server\fR and other database writers. The \fItransaction\fR
f7f62235
BP
118may specify database modifications, but these will have no effect on
119\fIdb\fR.
120.
722f6301 121.IP "\fBtransact\fI db transaction\fR"
f7f62235
BP
122Opens \fIdb\fR, executes \fItransaction\fR on it, prints the results,
123and commits any changes to \fIdb\fR. The \fItransaction\fR must be a
124JSON array in the format of the \fBparams\fR array for the JSON-RPC
125\fBtransact\fR method, as described in the OVSDB specification.
126.IP
127The \fIdb\fR is opened and locked for read/write access, so this
128command will fail if the database is opened for writing by any other
4e312e69 129process, including \fBovsdb\-server\fR(1). Use \fBovsdb\-client\fR(1),
f7f62235 130instead, to write to a database that is served by
4e312e69 131\fBovsdb\-server\fR(1).
f7f62235 132.
4e312e69 133.IP "\fBshow\-log\fI db\fR"
722f6301
BP
134Prints a summary of the records in \fBdb\fR's log, including the time
135and date at which each database change occurred and any associated
136comment. This may be useful for debugging.
c6782bb0 137.PP
4e312e69
BP
138To increase the verbosity of output, add \fB\-m\fR (or \fB\-\-more\fR)
139one or more times to the command line. With one \fB\-m\fR,
c6782bb0 140\fBshow\-log\fR prints a summary of the records added, deleted, or
4e312e69 141modified by each transaction. With two \fB\-m\fRs, \fBshow\-log\fR
c6782bb0
BP
142also prints the values of the columns modified by each change to a
143record.
722f6301 144.
f7f62235
BP
145.SH OPTIONS
146.SS "Logging Options"
147.so lib/vlog.man
148.SS "Other Options"
149.so lib/common.man
150.SH "SEE ALSO"
151.
152\fBovsdb\-server\fR(1),
153\fBovsdb\-client\fR(1),
154and the OVSDB specification.