[ZODB-Dev] merging databases containing multidatabase references

Shane Hathaway shane at hathawaymix.org
Fri Apr 24 05:37:29 EDT 2009


Christian Theune wrote:
> On Thu, 2009-04-23 at 15:02 -0700, David Glick wrote:
>> Having now realized the folly of trying to split things into multiple  
>> databases, I would really like to merge these 3 databases back into  
>> 1.  Any ideas for how I could go about this?  Based on http://docs.zope.org/zope3/Code/ZODB/cross-database-references.txt/index.html 
>>   and some experimentation, multi-database references are not  
>> supported by the import/export code.  Do I have other options?
> 
> I think it should be possible to write a tool that merges one database
> into another. This needs some processing on the database objects as
> their OIDs (and thus the internal references) need to be reorganized.

The import machinery in ZODB/ExportImport.py provides a good example of 
how to rewrite OIDs.  However, I am concerned that understanding that 
code requires a lot of experience with ZODB.

David, if you want to tackle writing a tool that merges multi-databases 
by rewriting OIDs, it probably won't be easy, but I think you can count 
on help from this list.  I also think the tool would be useful for others.

Shane



More information about the ZODB-Dev mailing list