IIS Migration and Synchronization tool, Web Deploy (Technical Preview 1)
We recently released IIS7's Web Deploy, which gives you the ability to migrate and synchronize IIS6 and IIS7 applications(download the x86 bits here and the x64 bits here).
Take a minute and think about the tasks that you do right now to move a web application from one server to another. There's all sorts of backing up, restoring, copying, praying, perhaps some cursing, and then validating on the machine. Consider, for example, the need to back up a web application before a migration, a change to the site, or by schedule. You can use the archive functionality in WebDeploy to accomplish this with a few simple lines of script.
Taking an archive or snapshot of a web site to restore or synchronize it later requires the following command on or against an IIS6.0 site:
msdeploy.exe -verb:sync -source:metakey=lm/w3svc/1 -dest:archivedir=c:\archive > wdeployarchive.log
(If you want to do the same action on an IIS 7.0 site, just replace metakey=lm/w3svc/1 with appHostConfig=”Default Web Site”.)
The > wdeployarchive.log argument makes sure that the results of the archive will be listed in the log file. This archive now works as a backup for the site, to sync to an IIS 6.0 server or to migrate to an IIS 7.0 server.
You can create an archive with most providers, excluding directory and file path providers. You can also re-sync the source provider, like the metakey, with the same archive or create new archives to achieve versioning. One note for the Technical Preview 1: you cannot add to an archive once it has been created.
Now let's say that you've (or someone has) trashed the web site on your server. You can restore the web site from your archive with this command for the IIS 6.0 site:
msdeploy.exe -verb:sync -source:archivedir=c:\archive -dest: metakey=lm/w3svc/1 > wdeployarchive.log
(Likewise,if you want to do the same action on an IIS 7.0 site, just replace metakey=lm/w3svc/1 with appHostConfig=”Default Web Site”.)
That means two lines of script for the archive and restoral of the Web site, with basic logging. If you want to learn more about how to use Web Deploy, check out these walk-throughs.
We are really excited about Web Deploy here in Redmond -- we're looking for your feedback, so try it out and let us know your thoughts in our forums on the Web Deployment team blog.