My b2evolution Version: 1.10.x
Has anyone successfully merged two or more b2 installs? I've got three installs I'm planning on merging into one and am looking for the best process.
I'm thinking about creating MT export files for two of the blogs then importing them into the "main" b2 install. It seems like after each import I'll be able to write some crafty SQL statements that will change all the blog_id columns to a "new" blog. I'll have to keep the categories straight at the same time.
Does this seem like a decent methodology or is there an easier way I'm not imagining?
This is a perl script I cooked up to export from a b2evolution version 1.9.3 database to MT/b2import format for the purpose of merging multiple b2evolution installs. It requires both the DBI and HTML::Entities perl modules.
Lazy shortcuts I made:
* It assumes a single author for all the posts: admin ($default_user).
* It assumes all comments without a "comment_author" to be admin ($default_user).
* It only assigns the default category
* It only imports published comments
I had to use HTML::Entities::encode_entities() on the comments or the import script would fail.
I also think it's worth mentioning that the MT-import utility doesn't exactly conform to the MT spec: http://www.sixapart.com/movabletype/docs/mtimport. I found that "AUTHOR:" must precede "TITLE:" in the export file which isn't covered in the format spec. So this script may or may not allow importing into MT.