ftimes-map2dbi.pl - Preprocess FTimes map data for MySQL DB import
ftimes-map2dbi.pl [-FM] [-d db] [-h host] [-m max-rows] [-t table] -f {file|-}
This utility takes FTimes map data as input, processes it, and
produces two output files having the extensions .sql and .dbi. The SQL
statements in the .sql file may be used to import the .dbi data into
MySQL -- dbi is short for DB Import. An extra field, joiner, is added
to the .dbi file. This field serves as the primary key -- either alone
or in conjunction with the hostname field. It can also be used as a
joining key to tie map and dig tables together.
- -d db
-
Specifies the name of the database to create/use. This value is passed
directly into the .sql file. The default value is 'ftimes'.
- -F
-
Force existing .sql and .dbi files to be truncated on open.
- -f {file|-}
-
Specifies the name of the input file. A value of '-' will cause the
program to read from stdin. If input is read from stdin, the output
files will be placed in the current directory and have a basename of
'stdin'.
- -h host
-
Specifies the name of the host to bind to the imported data. If
specified, an additional field, hostname, is inserted in the .dbi file
and filled with the appropriate value. By default, the hostname field
is not used.
- -M
-
Append the hostname, if defined, as a suffix on the table name. This
allows data for each unique host to be loaded into separate tables that
can be linked together using MySQL MERGE tables.
- -m max-rows
-
Limits the number of records that may be inserted into the specified
database. This value is passed directly into the .sql file as
MAX_ROWS.
- -t table
-
Specifies the name of the table to create/use. This value is passed
directly into the .sql file. The default value is 'map'.
Don't mix UNIX and Windows snapshots as they use different schemas.
Don't mix host and non host .dbi files for the same reason.
Klayton Monroe
ftimes(1)
All documentation and code are distributed under same terms and
conditions as FTimes.
|