blitzdb icon indicating copy to clipboard operation
blitzdb copied to clipboard

Merge two databases?

Open wmayner opened this issue 8 years ago • 2 comments

Suppose I've created two different filesystem-backed databases. Is there a preferred, sanctioned way of merging them into one?

Thanks for this, it fills a useful niche!

wmayner avatar Jan 04 '16 21:01 wmayner

Actually there isn't right now, if your two databases are not extremely large the simplest way would be to simultaneously open them and copy the documents from one to the other.

Alternatively, you could possibly also copy the document files and rebuild the indexes for each collection using rebuild_indexes, although I don't have any reliable test data on this so if you go down this route make sure to make a backup copy of your data first.

adewes avatar Jan 04 '16 22:01 adewes

Ok, that's what I figured, but I'll look into rebuild_indexes. Thanks!

wmayner avatar Jan 05 '16 04:01 wmayner