I'm fairly new to Drupal, though well-versed in PHP/MySQL/jQuery etc, and I've been struggling for too long with this. The scenario: I need to set up one Drupal site residing on one server where users can edit the content, and mirror the content on three other servers. The "master" site (for lack of a better term) and two of the mirrors are inside my organization's intranet; one server is publicly accessible on a shared hosting service (Dreamhost). I'd like my site editors to be able to edit nodes on the master server and, ideally, push a button to have their changes propagated to the other sites. It would also be acceptable to set up a cron job and let them wait until the next time cron runs the task.

One complication is that there are not too few but too many ways to try to do this. I have experimented with some popular modules that seem to be intended for this sort of use case. node_export exports nicely, but at import time it evidently refuses to update but rather insists on inserting a new node, even though I have it configured to update existing nodes )-:

I have had success with the Feeds module importing CSV data but node_export doesn't seem to offer a format that's compatible... no wait. It looks like maybe I can export to CSV and will give that a try. But anyway...

I've looked at a couple other modules and have been kind of intimidated by the complexity but I am willing to give them another try.

I am tempted to go back to my dear old friends bash, mysqldump and rsync (also perhaps my new friend drush) and wondering -- why not? Is there any reason not to programmatically set the replication sites to maintenance mode, run mysqldump for the database and rsync for the files -- excluding some key files such as settings.php -- and unset maintenance mode?

Another possible alternative, attractive because of its simplicity: have one central database and configure all the Drupal sites on the different machines to use it.

Any advice -- general or specific -- is welcome. Thanks.

Comments

yelvington’s picture

If I understand your intent: You want an intranet site to be able to publish to one or more Internet sites. If I were setting up something like that I'd start with the Services module (and one of the workflow tools, Rules, etc.) in order to have instant publication.

Alternatively, it's not a big deal to use Feeds (potentially in conjunction with Views) if the Internet sites can reach the Intranet site. The XML and JSON parsers in https://www.drupal.org/project/feeds_ex are very flexible, especially in conjunction with Feeds Tamper. You shouldn't need to use CSV.

professor_b’s picture

The public site cannot contact the internal sites that are behind a firewall, but the reverse can be done. If the public site needs to pick up a data file from the internal one, I see no reason why the internal site can't export data to someplace where the public site can get at it. So, I will look into that.

Continuing my thought experiment I come up with no reason why my three internal servers can't all use the same MySQL database -- that is as simple as it gets. So there's really only this one other piece of the puzzle.

Thanks again. Anyone else?