Add button to copy Prod to Staging slot instead of swap
When we deploy by using 'swap' the deployment slot will have an old version of the website. Since we want to use the deployment slot as a staging website, it would be great if we could copy the primary website to a deployment slot, without performing a swap.
Thanks for the feedback! We are working on enabling this feature.
Gert van de Venis commented
With 642 votes, this seems to be a heavily desired feature. The regular swapping strategy is causing us potentially dangerous side-effects with inconsistent states. Mainly on deploys that consist of multiple git repos that each iterate at their own pace.
Please let's get this one done rather sooner than later...
Jose Santin commented
Has this been enabled yet?
John Belmonte commented
Having copy capability as well as (not instead of) swap is a very valuable feature. Is there an ETA?
+1 for this feature, when will it be available?
Fred Willerup commented
This idea makes sense, but please keep the Swap as an option. We use a separate app for staging, then deploy to prod, then swap. However, in some cases we have found critical issues after swapping and it has been really useful to just swap back to "undo" the deployment.
So please keep the swap option.
govindagoud patil commented
It would be good have both option swap and copy
Jim Berg commented
App Service Plans are what we have to pay for each month. It doesn't cost anything to create an app service. We use a separate app service for our Dev, Stage, UAT, and Demo environments running in the same App Service plan. Each one has its own predeploy slot so we can stage the app before deploying to the "production" slot of the environment. Trying to configure all of your environments in a single app service is obviously a management nightmare.
I do, however, need a copy feature. My problem is that I want to be able to setup a predeploy slot for a WordPress site and unfortunately WordPress maintains uploaded content in a folder under wwwroot. I need a way to copy those files from the production slot or vice versa. Just having a swap would remove all of those files. A feature to sync specific directories between slots would be very useful. Is there anything like that available now? Or the ability to configure a virtual directory that points to a directory shared by every slot?
Hello, can u say something about a https://mobile-spy-apps.com mobile recorder on Android. How can we use this application in our phones?
Pavel Jonák commented
HI, how it looks with this new workflow? I would like to have this option in azure portal and powershell as well :) Because now is necessary to deploy into staging slot again after swap.
I need this! Just getting started with Azure, Slots seemed ideal, we until I realised, there is a potential for old files creeping back into production. At the moment, it's > make change > deploy to staging > swap to production > then redeploy source files back into staging (old production code), to keep everything in sync. Very cumbersome, or I'm missing the point of slots. I'd ideally like to keep everything in the MS stack.
+1 for this feature
How many years will it take to implement this?! Seems like a no-brainer to me. I need it just like everyone else commenting here. Last update is June 19, 2017. In that time we've probably seen the release of 100 new Azure services, much more complicated than this simple feature upgrade.
I'd be a little ashamed if I was the feature team on Web apps. :-(
Piers Lawson commented
Our current deployment process "promotes" a build of a website through TEST, UAT, PRE-PROD and eventually to PROD. Deployment slots seem an ideal way to provide a similar process... however, despite all the benefits of using the Swap functionality, the downside is that after a Swap, our old code would end up making its way back down that chain. After a few releases, TEST would be running what had been the PROD code several releases earlier.
Since other web sites also have TEST, UAT, PRE-PROD sites as well, which would link to other sites in the corresponding deployment slots, we could end up with one TEST site running the next release of its code linking to another web site running a very old release of its software.
So a button to copy the code running in one slot to another slot rather than using a Swap would be very useful. We'd then just have to decide if we would use the copy all the time instead of swap, OR use swap to promote followed by a copy backwards when we're happy OR use copy all the time except for a swap between PRE-PROD and PROD so we can rollback in PROD but don't have to worry about keeping most of the other environments in sync.
Or is there a better way to do this? Perhaps using Deploy tasks for TEST, UAT and PRE-PROD then a Swap for PRE-PROD to PROD?
Mark Allan commented
This would be a godsend. A -SourceSlot parameter on New-AzureRmWebAppSlot would save so much pain. Scripting it's a real headache, particularly with large sites where the Kudu ZIP APIs tend to keel over, not to mention the time that would be saved by copying locally rather than having to export and import. (My scenario: CMS site that needs to be updated and tested on a staging slot before switching to live - thanks SQL team for CREATE DATABASE AS COPY OF!)
Here's a scenario I could have used this today. I wanted to test how some settings in the web.config would affect production. Copy production into a new slot (AFAIK cloning feature does not let you clone into a slot, I tried). Test my changes in that slot and hit the slot URL. Swap into production when ready. Technically I can do all that with other tools/processes, but a one button copy would be nice and I can see myself using it a lot.
Just an update that we are still looking at how it is best to enable the feature. We definitely see the value in adding the option and we will update when we have more to share.
It's will be amazing. It's missing for me too.
Ned Dear commented
+1 for this. We frequently do development on a deployment slot, and periodically need to reset it back to the same state as the production site.
RAHUL VOHRA commented
@Nir Mashkowski, Is there any update regarding this feature? Or is there any workaround to just have one-way copy?