This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » multi-database to mono-base ?

multi-database to mono-base ?

multi-database to mono-base ?

Wednesday 21 November 2012 11:31:11 am - 2 replies


here's the context :

I'm working on a multi-site ez.
each siteaccess use its own database.
I need now to share contents (tags/media/news/articles/etc...), classes and roles/policies between my websites.
The easier way is to use the same database for each website. (?)

But it doesn't seem to be an easy thing to do.

I'm looking for your experiment in this case !
Is anybody did this before, and how ?

For the moment,
I think that I have to :

  • make a XML export of my contents (extension ezxmlexport ?)
  • correct my objects's ids and nodes's ids in the xml file to avoid conflicts
  • import the new xml file (extension ezsqliimport / ezxmlinstaller / data_import).

Am I on the good way ?

Thursday 22 November 2012 10:51:58 am

On a broad sense, you are on the good way.

You will have to take care of:

- content class definitions should be the same on both installs; also section definition, object-states

- permissions / workflows / rss you will have to set-up/fix/finetune on the final db after the content import

- creator_id and owner_id of the content you import: is it important to keep that data or can all content you want to import just be tagged as having been created by admin? If you want to keep creator info, you will have to sync the user-accounts before the rest of the content

- creation date for imported content: do you want to keep the original or is it ok to have it reset to current time?

Otoh most import/export extensions take care automatically of fixing node_id and remote_id at import time, to avoid duplicates. This works fine and dandy for most cases, but take care about it for reatining creator info.

The extensions you mention are good candidates. I think that the ezcontentstaging one could also be extended to support this usecase (but it is currently not enough). If your content is not too much, using the packaging system by itself could also prove to be sufficient - as long as you create/import packages via the command-line

Modified on Thursday 22 November 2012 10:52:48 am by Gaetano Giunta

Tuesday 27 November 2012 3:52:16 pm

Hi Gaetano,

thanks for your reply !

After a review of my websites, we don't have so much export to do, so the easy way (but the most boring) seems to use the package system.
A week might be enough to export/import all content.

But I have troubles with the packaging system :
related objects (images/files) are not exported when I use the admin interface 

Does the command line can fix this problem ?

I found this (poor) documentation on ezpedia :

So I will try...
thanks again.


If anybody knows where there is more documentation about ezpm.php, please tell me !


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from