4 Refreshing a Rock Development Environment from Production Shared by Tony Visconti, College Church 4 months ago 14.0 General Intermediate OverviewA refresh process has three high level steps. These are described in detail in the creating a sandbox resource found on the Alpha/Beta Testers PageCopy the Production database to the Development serverRun a SQL script to prepare the Production database copy for use on the Development serverCopy the Production "code" to the Development serverSpecifically, we are taking a copy of the IIS wwwroot folder and updating the web.ConnectionStrings.config to point the Development database (the one just copied over from production)Additional ResourcesHere are some additional resources provided by Rock Community members for consideration when drafting a refresh process more specific to your environment.Shawn Ross offers a concise step-by-step process that builds on the creating a sandbox resource: https://calvary.church/page/914?Item=452This resource is frequently pointed to when people in the community ask about how refresh a Development Environment with Production data.Derek Mangrum offers a unique look at "On-Premise Hosting a Test Environment Using Production Data" you can access with the content subscription. Derek makes use of several PowerShell scripts to automate the process.Jeff Richmond has shared his sql script for preparing the production database and updating html content, content channel items, lava shortcodes and much more.Here is a link to my process I created after reviewing the resources above and collaborating with Kelley Langkamp over at KFS. My version is similar to Derek's but geared toward hosting in Azure instead of on-premise.Additional TipsIncrementally convert your process from manual steps to something more automated over time. Writing/testing scripts can significantly increase the time you spend completing your first Production to Dev refresh.If you are already on Azure, consider leveraging Azure Storage to move the wwwroot file from Production to Development environment. In my scripts I use Azure Blob Storage and the Azcopy command in PowerShell to script the transition of this files. Azure Files is another option if you want to map a network drive onto both your Production and Development servers.Check out VS Code to make working with PowerShell scripts easier
Brent Pirolli Reply 3 months ago Hey Tony! Great summary. Thanks for the links. I'd been meaning to write up our process for a few months and just did today before finding your article. If you want to see our process and maybe some other ideas, check it out: https://community.rockrms.com/recipes/355/refresh-a-development-server-in-azureI do want to still automate a bit more of these steps with SQL but haven't had time to dig into those yet.
Ben Murphy Reply 3 months ago Thanks for bringing us this is a great recap of the process and I love the extra resources you provide from others in the community! Keep up the amazing ideas and practical ways to enhance Rock that you've been giving the community Tony!!!