My team has been getting more and more into CMSes over the past couple years. We have also been getting more and more into continuous integration. Reconciling the two has proven to be difficult. To make it even worse, we do LAMP and .NET sites so our scripts ideally work for both.
We have four environments for each site local, integration, staging and production. Content entry and file upload regularly occur on the production site. Development obviously starts locally and works its way up.
What are some of the methods or techniques that I can implement on my build server to automatically push data and schema updates from development environments into production without overwriting user-generated content? Conversely, how (and when) can I automatically draw user-generated data down into the development environments?