db2db(args)
A tool to merge one EventStore DB into another. We use the following
algorithm:
-
lock tables of output DB for writing
-
loop over available grade,timeStamps in input DB => get
graphid
-
update Version table in output DB
-
loop over files in FileID
-
using new graphid and new (fileName,fileType) update KeyFile and
Location tables. In the case of location file, change fileIds in
its header to new values. In both cases change fileName of
index/location files.
-
update FileID with new fileName (if any, in the case of data
file we don't change its name).
-
rename the file.
Please note, we only intend to change a prefix of files and rely on
the fact that all files in input DB were properly configured (according
with EventStore specs. This routine accepts a list of command line
arguments to do the merging. Here an example:
ESDB2DB -dbin EventStore1@/home/vk/sqlite.db -dbout
EventStore2@lnx151 -changeprefix /nfs /cdat
-
|