Provided by: openvswitch-common_2.0.2-0ubuntu0.14.04.3_amd64 

NAME
ovsdb-tool - Open vSwitch database management utility
SYNOPSIS
ovsdb-tool [options] create [db [schema]]
ovsdb-tool [options] compact [db [target]]
ovsdb-tool [options] convert [db [schema [target]]]
ovsdb-tool [options] needs-conversion [db [schema]]
ovsdb-tool [options] db-version [db]
ovsdb-tool [options] schema-version [schema]
ovsdb-tool [options] db-cksum [db]
ovsdb-tool [options] schema-cksum [schema]
ovsdb-tool [options] query [db] transaction
ovsdb-tool [options] transact [db] transaction
ovsdb-tool [options] [-m | --more]... show-log [db]
ovsdb-tool help
Logging options:
[-v[module[:facility[:level]]]]...
[--verbose[=module[:facility[:level]]]]...
[--log-file[=file]]
Common options:
[-h | --help] [-V | --version]
DESCRIPTION
The ovsdb-tool program is a command-line tool for managing Open vSwitch database (OVSDB) files. It does
not interact directly with running Open vSwitch database servers (instead, use ovsdb-client).
Basic Commands
create db schema
Reads an OVSDB schema from the file named schema and creates a new OVSDB database file named db
using that schema. The new database is initially empty. This command will not overwrite an
existing db.
schema must contain an OVSDB schema in JSON format. Refer to the OVSDB specification for details.
compact db [target]
Reads db and writes a compacted version. If target is specified, the compacted version is written
as a new file named target, which must not already exist. If target is omitted, then the
compacted version of the database replaces db in-place.
convert db schema [target]
Reads db, translating it into to the schema specified in schema, and writes out the new
interpretation. If target is specified, the translated version is written as a new file named
target, which must not already exist. If target is omitted, then the translated version of the
database replaces db in-place.
This command can do simple ``upgrades'' and ``downgrades'' on a database's schema. The data in db
must be valid when interpreted under schema, with only one exception: data in db for tables and
columns that do not exist in schema are ignored. Columns that exist in schema but not in db are
set to their default values. All of schema's constraints apply in full.
needs-conversion db schema
Reads the schema embedded in db and the standalone schema in schema and compares them. If the
schemas are the same, prints no on stdout; if they differ, print yes.
db-version db
schema-version schema
Prints the version number in the schema embedded within the database db or in the standalone
schema schema on stdout. A schema version number has the form x.y.z. See ovs-vswitchd.conf.db(5)
for details.
Schema version numbers and Open vSwitch version numbers are independent.
If schema or db was created before schema versioning was introduced, then it will not have a
version number and this command will print a blank line.
db-cksum db
schema-cksum schema
Prints the checksum in the schema embedded within the database db or of the standalone schema
schema on stdout.
If schema or db was created before schema checksums were introduced, then it will not have a
checksum and this command will print a blank line.
query db transaction
Opens db, executes transaction on it, and prints the results. The transaction must be a JSON
array in the format of the params array for the JSON-RPC transact method, as described in the
OVSDB specification.
The db is opened for read-only access, so this command may safely run concurrently with other
database activity, including ovsdb-server and other database writers. The transaction may specify
database modifications, but these will have no effect on db.
transact db transaction
Opens db, executes transaction on it, prints the results, and commits any changes to db. The
transaction must be a JSON array in the format of the params array for the JSON-RPC transact
method, as described in the OVSDB specification.
The db is opened and locked for read/write access, so this command will fail if the database is
opened for writing by any other process, including ovsdb-server(1). Use ovsdb-client(1), instead,
to write to a database that is served by ovsdb-server(1).
show-log db
Prints a summary of the records in db's log, including the time and date at which each database
change occurred and any associated comment. This may be useful for debugging.
To increase the verbosity of output, add -m (or --more) one or more times to the command line.
With one -m, show-log prints a summary of the records added, deleted, or modified by each
transaction. With two -ms, show-log also prints the values of the columns modified by each change
to a record.
OPTIONS
Logging Options
-v[spec]
--verbose=[spec]
Sets logging levels. Without any spec, sets the log level for every module and facility to dbg.
Otherwise, spec is a list of words separated by spaces or commas or colons, up to one from each
category below:
• A valid module name, as displayed by the vlog/list command on ovs-appctl(8), limits the log
level change to the specified module.
• syslog, console, or file, to limit the log level change to only to the system log, to the
console, or to a file, respectively.
• off, emer, err, warn, info, or dbg, to control the log level. Messages of the given
severity or higher will be logged, and messages of lower severity will be filtered out.
off filters out all messages. See ovs-appctl(8) for a definition of each log level.
Case is not significant within spec.
Regardless of the log levels set for file, logging to a file will not take place unless --log-file
is also specified (see below).
For compatibility with older versions of OVS, any is accepted as a word but has no effect.
-v
--verbose
Sets the maximum logging verbosity level, equivalent to --verbose=dbg.
--log-file[=file]
Enables logging to a file. If file is specified, then it is used as the exact name for the log
file. The default log file name used if file is omitted is /var/log/openvswitch/ovsdb-tool.log.
Other Options
-h
--help Prints a brief help message to the console.
-V
--version
Prints version information to the console.
FILES
The default db is /etc/openvswitch/conf.db. The default schema is
/usr/share/openvswitch/vswitch.ovsschema. The help command also displays these defaults.
SEE ALSO
ovsdb-server(1), ovsdb-client(1), and the OVSDB specification.
Open vSwitch 2.0.2 ovsdb-tool(1)