Previous Next

Thread: msdeploy, skip files

Last post 05-30-2008 12:39 PM by Filious. 9 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (10 items)

Sort Posts:

  • 02-12-2008, 9:10 AM

    • joeiis
    • Not Ranked
    • Joined on 02-12-2008, 2:08 PM
    • Posts 1

    msdeploy, skip files

    How do tell msdeploy to skip certain files (web.config for example) during a sync?

     Thanks,

     Joe

  • 02-14-2008, 2:22 PM In reply to

    • mvolo
    • Top 10 Contributor
    • Joined on 09-17-2003, 1:48 PM
    • Philadelphia, PA
    • Posts 583
    • IIS MVPs

    Re: msdeploy, skip files

    Hi Joe,

    You can do this by using a skip rule.

    Add the "-skip:object" switch to the sync command, where object describes the object you want to skip while syncronizing. For example:

    -skip:dirpath=c:\dontcopythisfolder 

    Thanks,

    Mike Volodarsky

    Program Manager
    IIS Core Server
    Visit mvolo.com for more IIS 7.0 posts, tools, and info

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 02-15-2008, 9:54 AM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 547

    Re: msdeploy, skip files

    Mike, skip rule won't work like that. Here is what is needed to skip web.config files.

    -skip:objectName=filePath,absolutePath=.*web\.config

    objectName is the object to skip (in this case files) and absolutePath is the regular expression which tells msdeploy which entries to skip.

    -Kanwal-

  • 02-20-2008, 1:07 PM In reply to

    • mvolo
    • Top 10 Contributor
    • Joined on 09-17-2003, 1:48 PM
    • Philadelphia, PA
    • Posts 583
    • IIS MVPs

    Re: msdeploy, skip files

    Cool, thanks for the clarification.

    Mike

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 05-13-2008, 10:34 AM In reply to

    • Filious
    • Not Ranked
    • Joined on 05-13-2008, 10:17 AM
    • Portugal
    • Posts 2

    Re: msdeploy, skip files

     RE Ksingla´s advice on skip files.

    I´m currently testing out MsDeploy and I need to setup some exclusion for some .gif that reside in a folder called images.

    -skip:objectName=filePath,absolutePath=Images\*.gif 

    The above just doesn´t work and if I do

    -skip:objectName=filePath,absolutePath=*Images*

    this works although I have other subdirectories called Images in other directories which with the above command their content also does not get copied or archived.

     

    Can anyone help??

     

    Apologies if the solution is realy simple, but I just can´t see it!!!!

     

     Filious

     

     

  • 05-14-2008, 6:08 PM In reply to

    • SparksFlyn
    • Top 500 Contributor
    • Joined on 06-19-2002, 10:15 AM
    • Pierre, SD
    • Posts 11

    Re: msdeploy, skip files

    I am using the following to skip the thumb.db because Windows Explorer has a lock on the file when browsing the folder.  It's definitly not needed by the website.

    -skip:objectName=virtualDirectory,absolutPath=.*thumb|.db 

     

     

    -OOPs! Shouldn't have touched that with a screwdriver while plugged in!
  • 05-14-2008, 6:26 PM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 547

    Re: msdeploy, skip files

    Filious.

    Value of absolutePath is interpreted as a regular expression. If you want to skip gif files under a folder, you will need a regular expression like below.

    absolutePath=.*folder\\subfolder\\.*\.gif$

    Thanks.
    Kanwal

  • 05-17-2008, 6:07 PM In reply to

    • jnapier
    • Not Ranked
    • Joined on 09-09-2002, 7:44 PM
    • Posts 2

    Re: msdeploy, skip files

    I have multiple directories/files that I want to skip sync on.  Can i specify the skip files in a manifest?

  • 05-19-2008, 1:54 AM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 547

    Re: msdeploy, skip files

    Jnapier,

    No, you cannot keep skip rules in a manifest. You can keep them in Microsoft.Web.Deployment.config though. You can open the file and take a look at SkipUnc rule for sample. You can set isDefault to true and then disable the rule using -disableRule switch as needed.

    Thanks,
    Kanwal

  • 05-30-2008, 12:39 PM In reply to

    • Filious
    • Not Ranked
    • Joined on 05-13-2008, 10:17 AM
    • Portugal
    • Posts 2

    Re: msdeploy, skip files

     

     Hi everyone,

     Ksingla, thanks for your help with my last query…..was ripping my hair out lol. Anyways having the following issue with “-skip”. I know the Microsoft.Web.Deployment.config file can be used but at the moment I’m scripting multiple options due to our environment so still sticking to the command line.

    My current issue is using the “-skip” command more than once. No matter what I try it just ignores the second “-skip”.

    I’m trying to avoid 2 files being replicated

    \\cisco\keepalive.html

    \\web.config*

     

    I´ve included the following output:

     

    C:\>msdeploy.exe -verb:sync -source:metakey=lm/w3svc/803843,computername=S-WF01Q-S01,username=****\**********,

    assword=******** -dest:metakey=lm/w3svc/803843,computername=s-nptwebp-dr01 -disableRule:SkipConfigProtectedData -disableRule:DefaultDependencyCheck -skip:objectName=filePath,absolutePath=.*.config -skip:objectName=filePath,absolutePath=.cisco –verbose –whatif

     

    Informational: Pre-authenticating to remote agent URL 'http://s-nptwebp-dr01.besp.dsp.gbes/MSDEPLOYAGENTSERVICE' as 'S-NPTWEBP-DR01\***********'.

    Informational: Attempting to sync without payload (optimistic sync).  Waiting for response...

    Informational: Received response from agent (HTTP status 'OK')

    Informational: Processing any events fired during remote agent operation

    Informational: Skipping destination rootWebConfig64 (metaKey/metaProperty[@name='ServerComment']/rootWebConfig64) due to rule BitTo64BitRuleHandler

    Informational: Skipping destination machineConfig64 (metaKey/metaProperty[@name='ServerComment']/machineConfig64) due to rule BitTo64BitRuleHandler

    Informational: Source filePath (keepalive.htm) missing from destination parent (d:\Services\ESInteraction\rootempty\cisco).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\rootempty\cisco\keepalive.htm)

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/AppRoot) to /lm/w3svc/803843/root/AppRoot due to rule AppRootNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/ScriptMaps) to /lm/w3svc/803843/root/ScriptMaps due to rule EnvironmentVariableNormalize

    Informational: Skipping destination filePath (d:\Services\ESInteraction\pimc\Web.config) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\pimc\Web.config.08082006) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\pimc\Web.config) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\pimc\Web.config.08082006) due to rule CommandLineSkipRule1

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/balcao/AppRoot) to /lm/w3svc/803843/root/balcao/AppRoot due to rule AppRootNormalize

    Informational: Source filePath (keepalive.htm) missing from destination parent (D:\Services\ESInteraction\rootempty\cisco).  Add pending

    Action: Adding child filePath (D:\Services\ESInteraction\rootempty\cisco\keepalive.htm)

    Informational: Skipping destination filePath (D:\Services\ESInteraction\Compliance\Compliance-1.1.0-B95.bin\Compliance\web.config) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (D:\Services\ESInteraction\Compliance\Compliance-1.1.0-B95.bin\Compliance\_web.config) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (D:\Services\ESInteraction\Compliance\Compliance-1.1.0-B95.bin\Compliance\web.config) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (D:\Services\ESInteraction\Compliance\Compliance-1.1.0-B95.bin\Compliance\_web.config) due to rule CommandLineSkipRule1

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/Compliance/AppRoot) to /lm/w3svc/803843/root/Compliance/AppRoot due to rule AppRootNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/Compliance/ScriptMaps) to /lm/w3svc/803843/root/Compliance/ScriptMaps due to rule EnvironmentVariableNormalize

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.08082006) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.11102006) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.2008.02.21) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.2008.03.13) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.24012008) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config_04032007) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config_23042007) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config_26102007) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_04032007\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_04032007\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_04032007\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_04032007\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_27012007\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_27012007\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_27012007\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_27012007\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_old22112006\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_old22112006\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_old22112006\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\bin_old22112006\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\Clientes\ARC_Configuracao.aspx) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\Clientes\ARC_Configuracao.aspx) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\old_bin\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\old_bin\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping destination filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\old_bin\ESInteraction.NPT.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\old_bin\ESI.NPT.Web.Config.dll) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\old_bin\ESI.NPT.Web.Config.pdb) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\old_bin\ESInteraction.NPT.Config.dll) due to rule CommandLineSkipRule1

    Informational: Source filePath (versao.aspx) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\versao.aspx)

    Informational: Source filePath (WebForm1.aspx) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\WebForm1.aspx)

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/npt/AppRoot) to /lm/w3svc/803843/root/npt/AppRoot due to rule AppRootNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/npt/ScriptMaps) to /lm/w3svc/803843/root/npt/ScriptMaps due to rule EnvironmentVariableNormalize

    Informational: Skipping destination filePath (D:\Services\ESInteraction\pimcutils\Web.config) due to rule CommandLineSkipRule1

    Informational: Skipping source filePath (D:\Services\ESInteraction\pimcutils\Web.config) due to rule CommandLineSkipRule1

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/pimc/AppRoot) to /lm/w3svc/803843/root/pimc/AppRoot due to rule AppRootNormalize

    Change count: 4

     

    And if I change the “-skip” command around

     

    C:\>msdeploy.exe -verb:sync -source:metakey=lm/w3svc/803843,computername=S-WF01Q-S01,username=****\**********,

    assword=******** -dest:metakey=lm/w3svc/803843,computername=s-nptwebp-dr01 -disableRule:SkipConfigProtectedData -disableRule:DefaultDependencyCheck -skip:objectName=filePath,absolutePath=.cisco -skip:objectName=filePath,absolutePath=.*.config –verbose –whatif

     

    Informational: Pre-authenticating to remote agent URL 'http://s-nptwebp-dr01.besp.dsp.gbes/MSDEPLOYAGENTSERVICE' as 'S-NPTWEBP-DR01\************'.

    Informational: Attempting to sync without payload (optimistic sync).  Waiting for response...

    Informational: Received response from agent (HTTP status 'OK')

    Informational: Processing any events fired during remote agent operation

    Informational: Skipping destination rootWebConfig64 (metaKey/metaProperty[@name='ServerComment']/rootWebConfig64) due to rule BitTo64BitRuleHandler

    Informational: Skipping destination machineConfig64 (metaKey/metaProperty[@name='ServerComment']/machineConfig64) due to rule BitTo64BitRuleHandler

    Informational: Skipping source filePath (d:\Services\ESInteraction\rootempty\cisco\keepalive.htm) due to rule CommandLineSkipRule1

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/AppRoot) to /lm/w3svc/803843/root/AppRoot due to rule AppRootNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/ScriptMaps) to /lm/w3svc/803843/root/ScriptMaps due to rule EnvironmentVariableNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/balcao/AppRoot) to /lm/w3svc/803843/root/balcao/AppRoot due to rule AppRootNormalize

    Informational: Skipping source filePath (D:\Services\ESInteraction\rootempty\cisco\keepalive.htm) due to rule CommandLineSkipRule1

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/Compliance/AppRoot) to /lm/w3svc/803843/root/Compliance/AppRoot due to rule AppRootNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/Compliance/ScriptMaps) to /lm/w3svc/803843/root/Compliance/ScriptMaps due to rule EnvironmentVariableNormalize

    Informational: Source filePath (versao.aspx) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\versao.aspx)

    Informational: Source filePath (web.config) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config)

    Informational: Source filePath (web.config.08082006) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.08082006)

    Informational: Source filePath (web.config.11102006) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.11102006)

    Informational: Source filePath (web.config.2008.02.21) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.2008.02.21)

    Informational: Source filePath (web.config.2008.03.13) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.2008.03.13)

    Informational: Source filePath (web.config.24012008) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config.24012008)

    Informational: Source filePath (web.config_04032007) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config_04032007)

    Informational: Source filePath (web.config_23042007) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config_23042007)

    Informational: Source filePath (web.config_26102007) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\web.config_26102007)

    Informational: Source filePath (WebForm1.aspx) missing from destination parent (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot).  Add pending

    Action: Adding child filePath (d:\Services\ESInteraction\nptweb\1.0.0\wwwroot\WebForm1.aspx)

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/npt/AppRoot) to /lm/w3svc/803843/root/npt/AppRoot due to rule AppRootNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/npt/ScriptMaps) to /lm/w3svc/803843/root/npt/ScriptMaps due to rule EnvironmentVariableNormalize

    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/w3svc/803843/root/pimc/AppRoot) to /lm/w3svc/803843/root/pimc/AppRoot due to rule AppRootNormalize

    Change count: 11

     

     

Page 1 of 1 (10 items)
Page view counter