Tag Archives: msftp

Synchronising FTP sites in MSFTPSVC

I am currently working on developing a pair of FTP servers, one active and one DR. The main plan for this is that we have an ftp alias, e.g. This will point to the active ftp server most of the time and when the active server is down, we will change the alias to point it to the DR server.

I had talked about

Now iis resource kits comes with a vbs file call iiscnfg.vbs. This provides import and export capability of your ftp, which allows you to schedule task to export ftp settings from one server and import it into a cold standby server.

Now what I want to do is to create one script that runs from the DR server. The script should export the values from the active ftp server and then import the xml file into itself, say every 2 hours.

So the first thing I tested was the iiscnfg export feature, so I fired up the command line and use examples I find on the internet to test exporting:

iiscnfg /export /S ftpserver /f d:\scripts\ftp.xml /sp /lm/msftpsvc/122345 /children /inherited

and I got a strange error:

Connecting to server …Done.
Error while exporting configuration.
The system cannot find the path specified.

I am very sure that the folder d:\scripts exists on that DR server and the metabase path is definitely correct. So I tested this and fire the same command from the active server and I got the same error. Ran a quick check and realised the d:\scripts folder was not created yet. Created it and the command fired up okay.

I went back to the DR server and fired up the command again and hey… it went okay! Weird.

However, I could not find the file d:\scripts\ftp.xml in the DR server. Even stranger still. Okay, I shall fire the command again and watch that folder and sure enough the command run okay, but the xml file still cannot be found!

However, I managed to catch sight of some movements in another opened console on the active ftp server. Looked at it and strangely enough, I found the ftp.xml in the d:\scripts\ftp.xml folder on the active ftp server instead!

So it seems like if you run iiscnfg command on a remote server, the folder path which you input is actually the folder path of the remote server, not that server where your scripts runs!

Another mystery solved.

Leave a comment

Posted by on November 16, 2007 in Windows