Skip rules in msdeploy

I pass a few skip arguments to msdeploy so as not to synchronize (delete and update) some directories and files

-skip:skipAction='Update',objectName='filePath',absolutePath='.*\\documents\\.*' 

It does not seem to work, some directories and files are deleted. I am sure there is no problem in the regex given by absolutePath

Can anyone clarify how matching works for skipping rules? It obviously does not work according to regex and objectName.

+4
source share
1 answer

Look at here:

http://forums.iis.net/p/1192163/2031814.aspx#2031813

Skipping rules are applied based on the order in which the synchronization operation (delete, update, add) is performed for the actual object (directory or file).

For example, if there is a delete operation in the directory, skip rules for files in the directory for the delete operation will NOT PREVENT files from Get DELETED!

In my case, the MySite \ MobileForms directory is completely deleted. The skip rule set for files is useless.

And for the directory, my mistake is in the regular expression:

-skip:skipAction='Delete',objectName='dirPath',absolutePath='.*\\MobileForms\\.*'

Must be:

-skip:skipAction='Delete',objectName='dirPath',absolutePath='.*\\MobileForms$'

which says it should skip deleting the MobileForms directory path (the first rule mistakenly included a slash in the regular expression).

Hope this helps others too.

+4
source

Source: https://habr.com/ru/post/1437207/


All Articles