skip rules in msdeploy
Asked Answered
A

1

7

I am passing several skip arguments to msdeploy in order 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 get deleted. I am pretty sure there's no problem in the regular expression given to the absolutePath

Can anyone please clear up how the matching works for the skip rules? It is clearly not working according to the regular expression and objectName.

Anxiety answered 1/10, 2012 at 14:53 Comment(0)
A
8

Look here:

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

The way skip rules are applied is based on the order of the synchronization operation(delete, update, add) is done on the actual object(directory or file).

For example, if there's a delete operation on the directory, the skip rules for files within the directory for the delete operation will NOT PREVENT files from being get DELETED!

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

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

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

Should be:

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

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

Hope this helps others as well.

Anxiety answered 2/10, 2012 at 11:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.