Sucaritas
Sucaritas

Reputation: 51

web deploy backup for single App not a whole site

I have followed the instructions here http://www.iis.net/learn/publish/using-web-deploy/web-deploy-automatic-backups and the setup works fine. but my site has a ton of applications. and when i publish a single application on the site the whole site is being backed up.

I want a setup where, when i publish an application to my site, web deploy will back up that one specific Application. Here is the setup I have

<wdeploy>
        <backup turnedOn="true" enabled="true" backupPath="d:\AppBackups\{siteName}" numberOfBackups="5" continueSyncOnBackupFailure="false">
            <excludedProviders>
                <provider name="appPoolEnable32Bit" />
                <provider name="setAcl" />
                <provider name="appPoolPipeline" />
                <provider name="createApp" />
                <provider name="appHostAuthOverride" />
                <provider name="appPoolNetFx" />
            </excludedProviders>
        </backup>
    </wdeploy>

Upvotes: 4

Views: 823

Answers (2)

jonmeyer
jonmeyer

Reputation: 848

I'm struggling with this too, and found a workaround/solution, although I do not like it. You can create another internal "Site" that maps to the same path location as the child application and setup backups for that. That way when you deploy to the internal site it will be reflected in the child application of the other site and still be backed up. Edit:

  • 1. You can have Site A: with Child Applications B,C,D
  • 2. You can then create a Site B which has its physical directory linked to the same location as Application B
  • 3. You are then able to setup backups on Site B and they will be reflected in Application B
  • 4. Site B can be setup to not be public and you can maintain the Subdirectory path of Site A, Application B

Upvotes: 1

Alexei - check Codidact
Alexei - check Codidact

Reputation: 23078

I have also struggled to find a way to this using tools provided by Microsoft, but I do not think this is possible (by design):

1) Configure Web Deploy Publishing (IIS menu item) options are available only at Web Site level, not Web application level. Maybe they thought that, since you are configuring at site level and you can deploy from Visual Studio on any Web App you want, back all the site, just to be sure.

2) Deployment automatic backup seems to know to expand only site related tokens: {SitePathParent} and {siteName}, so no application level ones.

So, either accept full site backups (zip files of the entire web site which may take some time) or use some custom Powershell scripting for deployment against IIS.

Upvotes: 0

Related Questions