Keeping Your Local and Remote Sites Synchronized

The point of a test site is to have a place to experiment or develop new content without impacting your users or giving away your latest gee-whiz before its time. But it is also important to make sure that you always have a good working version of your live site on your test site.

Let's ignore, for the moment, that in an "ideal" world you will have a staging site which is always identical to the live site and nothing goes live without being staged.

There are two basic techniques for keeping your sites synchronized:

  • Manually making sure that the content of the two sites are the same.
  • Frequent uploads or downloads of database back ups.

The first technique is quite time consuming and it's difficult to keep user comments on your test site. It also relies on your memory to know what's been changed, unless you update both sites at the same time. If there are things that are dependent on other things (sorry for the technical terminology), you have to be careful that you update them in the right order so that your random visitor doesn't break something.

The second technique allows for user comments to be downloaded to your test site. From there they can be incorporated into the content and deleted, or left as is. You just have to be careful that you don't lose new, experimental, or incomplete content that hasn't been put onto the production site yet.

Which is better? I can't answer that question for you. You need to weigh the risks and benefits and decide that for yourself. Personally, at my age and with my memory, the second technique is probably better for me, at the risk of losing something not yet uploaded. I also have the bad habit of updating things on the live site and not bring the change back to my test site.

More to come


Yet another couple ways to achieve the same results

I appreciate you taking time to post this article. I too found it useful. Additionally, it is germaine to me as I use Drupal all over the place.

I thought I would drop two pointers to ideas to do the same thing:

1) Use web services to keep them synchronized. there is a nice article showing how to do this using .Net Web Services but there is no reason it can't be done in PHP, some other scripting language, or just baked into a JAVA app.<

2) Use hardware: This is actually the most reliable means to keeping databases synchronized; however, it is also the most costly. This also assumes certain topologies across a private network. iSCSI SAN Switches are becoming less expensive everyday; however, if you want something that really has some meat on it, check out Brocade's or NetApp's SAN switches which replicate disk blocks rather than working at the data layer.

I've used this to replicate SAN storage across seven data centers on five continents and it "just works". WARNING: Complex and Costly setup.

Other Resources:<<<

pay respect to the original author

Before you post topics you copy and pasted please make a statement about the true author about this article, rather than claiming it as your own, i found this same article in DRUPAL<

Yes, you did

Yes, you did see it, and the rest of this cookbook on And if you check you will see that I am the original author and that posting dates on this web site predate those. And, BTW, I do respect myself.



Good reasoning

Thanks for this little tutorial. Good reasoning. Will contine explore your site and tips.


Thank you for stopping by.