%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
To import the Application Pools:
%windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml
To Export all you’re website:
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml
This will export all the websites on you’re webserver, therefor you need to edit the sites.xml and remove the websites that you do not need to import for example:
To Import the website:
%windir%\system32\inetsrv\appcmd add site /in < c:\sites.xml
It’s also possible to export a single website or application pool all you need to do is add the name of the Application Pool or Website to the command line:
To export/import a single application pool:
%windir%\system32\inetsrv\appcmd list apppool “MyAppPool” /config /xml > c:\myapppool.xml
Import:
%windir%\system32\inetsrv\appcmd add apppool /in < c:\myapppool.xml
To export/import a single website:
%windir%\system32\inetsrv\appcmd list site “MyWebsite” /config /xml > c:\mywebsite.xml
Import:
%windir%\system32\inetsrv\appcmd add site /in < c:\mywebsite.xml
http://www.microsoftpro.nl/2011/01/27/exporting-and-importing-sites-and-app-pools-from-iis-7-and-7-5/
Không có nhận xét nào:
Đăng nhận xét