?
Solved

save website configuration to file from command line

Posted on 2007-04-07
9
Medium Priority
?
264 Views
Last Modified: 2010-04-20
I'm looking for a way to save a website configuration to file from command line. Or a way to import a specific site from the metabase as a different name. I need a way to backup one site from IIS and restore it in the same IIS as a different name.
0
Comment
Question by:josgan
  • 4
  • 4
9 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 18871915
you got a M$ system which is designed to work without input devices, oops, at least without a keyboard ... ;-) IIRC there is no way to export the configuration except using regdump or something like that.
0
 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 18872926
What version of IIS are you running?

Dave Dietz
0
 

Author Comment

by:josgan
ID: 18873070
IIS 6
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 18873098
IISCNFG.VBS can do what you're looking for.

There is good documentation for it if you search in the IIS help files, or you can try running 'iiscnfg.vbs /export /?' from a command line for usage parameters.

You would then use the /import flag to take the saved data and red it back into the Metabase and you can specify a different destination than the path that was saved from.

Dave Dietz
0
 

Author Comment

by:josgan
ID: 18875999
From all the docs i'm reading it says that yes it is possible to do just parts of the metabase, but it doesn't show how.
0
 
LVL 34

Accepted Solution

by:
Dave_Dietz earned 2000 total points
ID: 18877200
If you want to back up just the default web site you would do the following:

iiscnfg.vbs /export /f site.xml /sp /lm/w3svc/1 /children

To import this as a site with identifier '2' you would use the following:

iiscnfg.vbs /import /f site.xml /sp /lm/w3svc/1 /dp /lm/w3svc/2 /children

Dave Dietz
0
 

Author Comment

by:josgan
ID: 18877296
do the sites go in that order inside the manager? The site listed first is 1, the site listed second is number 2 and so on?
0
 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 18877462
I believe the sites are listed in order of creation (the order they appear in the Metabase).

The sites are appended to the Metabase and are not arranged in any special order.

You can simply click on the 'Web Sites' entry in the IIS MMC and look at the Identifier column to see which identifier to use for exporting and which ones *not* to use for importing.....  :-)

Dave Dietz
0
 

Author Comment

by:josgan
ID: 18877557
thanks loads. I was looking in the metabase backups for the ident. Yours' is a ton more explainable.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question