Sync Staging (From Staging to Production as Simply as Possible)

Problem

To me a staging server is one where I try new modules, make settings changes, and otherwise screw around with the data structures. A production server holds the content, interacts with my users, etc.

My problem is when I need to create a staging server (by dumping the production server database) it immediately goes out of sync with the production server.

Attempted Solutions

  • Deployment - The deployment framework is a series of modules which are designed to allow developers to easily stage Drupal data from one site to another. Unfortunately, all the modifications have to be done manually, so on a large production site it can be very difficult to keep the stage site up-to-date with user content
  • Staging - Description is vague since it is a new comer to this arena. Appears to be designed to send staging configuration to the production site. Could potentially write over user created content.
  • AutoPilot - AutoPilot is a complete build system that captures code and configuration changes from entire teams of developers, merges and synchronizes it, and provides a framework for easy, consistent, and optionally, scheduled builds. Not developed for Drupal 6.x
  • Stage - The stage module taps into Drupal's revision system to allow host-based staging of content stored in the database. No module is available and appears to be abandoned.

Proposed Solution

What I would like to propose is a module which automatically syncs all modification made on the production site, back to the staging site. This includes new comments, node revisions, new users registrations, etc.

The way it would work is when an event happens on the production site, it is also triggered to occur on the staging site.

If a change is being made on the staging site that might conflict with this sync, the permissions should be modified to prevent this from occurring.

For example, if you are working on switching from using the Image module to using ImageField, you can temporarily turn off permissions to upload Images for all users. This way production events don't mess up the work your doing on the staging site. This also guarantees nothing falls through the cracks when all the images are migrated.

This will allow site builders to keep their staging site up-to-date with the production site. When the staging site is stable and it comes time to make the switch, you can just put both sites in maintenance mode and replace the database of the production with the staging database. When you disable maintenance mode, the new features and user content should be available with no headaches.

Login to post comments

Features

Rob Loach's picture
Rob Loach - Tue, 2009-09-08 13:16

Another solution out there is Features. I was talking with Ken at DrupalCon and he also brought up the idea of using Domain Access to mimic a staging website, but have special settings and stuff for the staging site.


I have this exact problem as

JayKayAu - Mon, 2009-11-09 02:06

I have this exact problem as well. I would have thought that this problem is not only common, but would appear in pretty much every instance of Drupal out there?

In any case, thank you for taking the time to investigate these other solutions.

I've heard a suggestion from a colleague who works in a Joomla shop that there's a Joomla module which keeps track of any changes that users make to a site, and lets you roll-back any changes (useful if they're busy breaking the site by digging around in the admin area). I'd love to get my hands on something like this as well!