1

I currently have two Drupal sites and I would like to synchronize in a specific way the data of each one.

More precisely, the first one contains detailed informations and the other only has the main data necesary for its work. I would like to refresh (create/update) the data of the second one when the first one is modified and also would like to refresh (create/update) the first one when the second one is modified, taking into account the content types and field names are not the same in both. In my case, the data that should be manipulated are nodes and users.

I have already tried to find solutions through web services or feed import, but I didn't succeed to build a correct one. Moreover, I also studied the possibility to schedule periodic import from web services but it would be slow the site performance, due to the very important amount of data contained in each site.

Can someone help me?

3
  • Domain Access allows for sharing content among sites hosted within a same drupal install. It might be worth a look : drupal.org/project/domain
    – rtome
    Commented Jan 5, 2015 at 15:51
  • Well, in fact, the two sites don't have the same drupal install. There are really independent and each one has its own database, so I think I can't use this module to do what I want. Thanks for the answer :) Commented Jan 5, 2015 at 16:03
  • Agreed. If going for a multi-site in a single drupal instance is not an option Domain Access won't do.
    – rtome
    Commented Jan 5, 2015 at 16:25

1 Answer 1

0

You need to work on the database a little bit.

I think it is impossible to make it work if you just write php. Because it will generate a lot of database login errors.

There might be a lot of ways to do that, but the only way I know is to: First, Combine two database into one, two different databases with two different prefix. Second, delete all the attributes you want to synchronize in the second database. Third, link the synchronized field in the second database to the first database, you can do this in the settings.php in the second drupal site.

But there might be some dependency problems when you do step 2. Don't forget to backup at first.

This link might be helpful How to connect to multiple databases within Drupal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.