Tag Archives: iis

Caveat of using msdeploy to sync web or ftp sites in IIS7

MSdeploy.exe is an important tool that you can use to sync web sites or ftp sites. I was testing msdeploy to keep two IIS7 FTP sites in sync. I used the following command:

msdeploy -verb:sync -source:apphostconfig="ftproot" -dest:apphostconfig="ftproot",computername=2ndserver

The sync works of course, but at the same time I found that one of my folders in d:\data was also syncing to the 2nd server. It had delete all other folders and files in the d:\data on the 2nd server!

The reason it seems is that the sync verb will sync everything including physical folders defined by your FTP virtual directory! The problem was that I had created an FTP virtual directory whose physical path is d:\data. This caused msdeploy to also sync any FTP vdir physical path to the 2nd server and with undesirable effects if you don’t want this to happen. If you only want to sync the FTP vdir but not the sync the contents of the physical folders, you need to get msdeploy to skip folders with the following:

msdeploy -verb:sync -source:apphostconfig="ftproot" -dest:apphostconfig="ftproot",computername=2ndserver -skip:objectName=dirpath,absolutePath=".*"
Leave a comment

Posted by on March 19, 2015 in Windows



HTA: Adding IIS FTP Virtual Directories

I wrote this HTA script because I wanted simple GUI to handover to my 1st level support. MS IIS do come with some Vbscripts to manage iis ftp virtual directories, but it does not allow you to add ftp vdir pointing to unc paths, also in our setup, we have write access to the ftp vdir, which was not in the MS IIS script.

  • We have 3 FTP servers which we manage in TKY, HKG and SGP.
  • The script allows the user to choose which FTP server to add new VDir to.
  • Remember that you must change the SiteID for.
  • Also the server name is based on FTP<Site>, e.g. FTPHKG, you should change it based on your own naming convention

Read the rest of this entry »


Posted by on March 4, 2008 in Scripts, Windows


Tags: ,