NAME
dbnew2orb - send new or updated database rows to an orbserver
SYNOPSIS
dbnew2orb [-sleep seconds] [-pf pfname] [-state statefile]
[-lastid] [-wfdisc] [-prefix prefix] [-modified_aftertime]
[-v] db orb
SUPPORT
Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.
FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.
DESCRIPTION
dbnew2orb watches a database for modifications and sends modified rows to an orbserver.
It allows to transfer a database so that it can be used on the receiving side with programs
that keep the database open like e.g. dbevents.
OPTIONS
-
-sleep seconds
seconds specifies the number of seconds to wait between iterations over all database
tables. Defaults to 60 seconds.
-
pf pfname
Specify a pfname as the parameter file name for dbnew2orb. Defaults to dbnew2orb.
-
state statefile
Specify a statefile used for saving and restoring the modification times (lddate) of
the database rows. Note that due to rounding errors some rows could be retransmitted after a restart.
-
-prefix prefix
This can be used to distinguish between different databases on the orbserver. This overwrites the prefix
specified in the parameterfile.
-
-modified_after time
Transfer only rows that have been modified after time. The default is to transfer only rows
modified after the start of the program.
-
-lastid
transfer lastid table. I cannot think of a situation where it might be safe to transfer the lastid table, therefore this
is disabled by default.
-
-wfdisc
transfer wfdisc table. Since the wfdisc table is igenerally modified frequent, this can result
in high data volume. There is a dozen more intelligent methods to transfer waveforms within
Antelope. The default is to ignore the wfdisc table.
-
-v
verbose flag
-
db
Input database.
-
orb
Name of the target orb.
PARAMETER FILE
The
dbnew2orb parameter file contains parameter that control how and when modified rows are sent to the destination orbserver. Following is the default parameter file:
sleep 60 #naptime between checks
check_lddate_interval 5 #check lddate every nth iteration
prefix dbn2orb #sourcenames <prefix>/db/<tablename>
ignore_tables &Tbl{
}
check_tables &Tbl{
}
Parameter definitions are as follows:
-
sleep
This is the time in seconds to wait between iterations over all tables.
-
check_lddate_interval
Since a check of lddate is time consuming, the program checks most of the times only the modification times of the database tables. But to see also modifications of existing rows, a check of the lddates is performed only every check_lddate_interval.
-
prefix
This prefix can be used to distinguish between several datanase on the destination orbserver.
-
ignore_tables, check_tables
List of tablenames that wil (or will not) be transferred to the orbserver.
Note that both wfdisc and lastid need to be specified on the commandline.
EXAMPLE
Export one of the example databases:
> ./dbnew2orb -prefix db2orb -modified_after 1950-01-01 -v $antelope/../data/db/demo/demo :
dbnew2orb: 2/21/2005 20:30:30.619: 13 packet(s) sent with sourcename: db2orb/db/affiliation
dbnew2orb: 2/21/2005 20:30:30.624: 12 packet(s) sent with sourcename: db2orb/db/arrival
dbnew2orb: 2/21/2005 20:30:30.630: 9 packet(s) sent with sourcename: db2orb/db/assoc
dbnew2orb: 2/21/2005 20:30:30.634: 5 packet(s) sent with sourcename: db2orb/db/netmag
dbnew2orb: 2/21/2005 20:30:30.637: 1 packet(s) sent with sourcename: db2orb/db/network
dbnew2orb: 2/21/2005 20:30:30.784: 1351 packet(s) sent with sourcename: db2orb/db/origin
dbnew2orb: 2/21/2005 20:30:30.800: 39 packet(s) sent with sourcename: db2orb/db/sensor
dbnew2orb: 2/21/2005 20:30:30.804: 13 packet(s) sent with sourcename: db2orb/db/site
dbnew2orb: 2/21/2005 20:30:30.811: 39 packet(s) sent with sourcename: db2orb/db/sitechan
dbnew2orb: 2/21/2005 20:30:30.814: 4 packet(s) sent with sourcename: db2orb/db/stamag
save the demo database on the other side:
> orb2dbt -select "db2orb.*" -overwrite : copy-of-demo
BUGS AND CAVEATS
The current version of the program transfers external files, i.e. those referenced by the fields dir and dfile
dfile.
This could result in large data volume transferred.
Sometimes one might see strange log entries coming from orb2dbt on the receiving side. While this looks
frigthening, it still seems to work fine.
SEE ALSO
dbt2orb(1),orb2dbt(1).
AUTHOR
Nikolaus Horn, 2005,2013
ZAMG / Vienna, nikolaus.horn@zamg.ac.at
Antelope User Group Contributed Software