Module ESDB2DB
[show private | hide private]
[frames | no frames]

Module ESDB2DB

A set of tools to merge one EventStore DB to another
Function Summary
  db2db(args)
A tool to merge one EventStore DB into another.

Function Details

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

Generated by Epydoc 2.1 on Tue Jan 24 10:46:01 2006 http://epydoc.sf.net