3

I've finally gotten my Drupal7 Development->Staging->Production file & db syncing all working nicely using a mix of rsync, rsyncd, git &, where it doesn't cause more/unnecessary work for me, drush.

Not the cleanest approach, but all working quite nicely.

Until i realized ...

a DB push from Staging->Production that contains changes I've made & QA'd @ my Staging site (for modules, site config, etc), will overwrite any/all user data/content @ the Production site. Unless, of course, I specifically identify & exclude the tables that contain data/content -- and simply don't inclue them in the push.

My question is -- other than manually checking -- is there a reliable method (a pre-existing static list? a sql query on table names? something?) to know those tables to exlude?

This

How to migrate from test environment to production environment? How to migrate from test environment to production environment?

in addition to countless other threads I have found, mentions "Features" and "Deploy", and basically says "it's hard". If the answer's "in there", I haven't wrapped my head around it yet.

Again, I've got the mechanics working as I want them. This last step is identifying -- and voiding overwrite of! -- the user content/data at the Production site.

1
  • It's not a good idea to version control database driven content, just configurations and code. Periodically, you can import the production database into a test site. Data always flows down and code always flows up.
    – Christia
    Commented Nov 2, 2017 at 20:12

1 Answer 1

1

This is a big architectural issue and as answers to the other question says: UUIDs in core in D8 will be a big improvement. They'll give all content a unique ID (independent of the content id in the database), and so if you make important modifications to content in some staging phase, the software could reconcile which content is worth transferring.

There's a UUID project for Drupal 7, which I believe Deploy module can use in this way.

The integration with Services module alters all UUID enabled entity resources (nodes, users, taxonomies etc) to be based on UUIDs instead. This way it becomes easier to share and integrate content between sites. This functionality is used by Deploy module.

1
  • I'd not yet seen this for D7. IIUC, UUID enables complete identification & separation, or separability, of user content. If so, this makes sense to me. Offhand, is this how Deploy specifically makes use of it?
    – user6023
    Commented Mar 17, 2012 at 21:32

Your Answer

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