1

Our dev server is on an internal network that is not connected to the WWW. As such, I have the Google Analytics module turned off on the dev server, because it really slows down page loads when enabled, since it can't reach the Google servers. Occasionally, when I migrate site changes up to the production server, I will forget to enable the module on the live site. It gets disabled because it's disabled on dev. Is there a way to exclude module settings from a database backup? (We're using the Backup and Migrate module.)

2 Answers 2

0

It probably is possible, but not with Backup and Migrate. BaM only enables you to exclude whole tables, and enabled / disabled status is a row.

Worse, your devel environment contains different set of scripts than production one. This may have various side effects, bugs you will only see after migrating your changes to production. That's exactly what you want to avoid, so consider other options:

  1. Test site in environment that can connect to WWW, either by switching your dev server, or by creating dev/staging machine connected to www-enabled testers' workstations. In this latter case, you will catch if you forgot to enable something.

  2. Store GA JavaScripts on some local place, and use hosts file or local DNS to fake traffic. It would be pretty safe to just make needed JS files available, I nothing changed recently you don't need to care about actually doing anything with data GA is trying to send to Google.

0

Good question. Have a look at the [environment project1. It's drush with a php snippet that provides actions based on environment.

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.