Archiving and Restoring a Web site

Author: Faith Allington

Published on March 23, 2008 by faith_a

Updated on October 29, 2008 by faith_a

Average Rating  Rate It (2)

RSS

This quick guide will show you how to create an archive of a website, and then restore the site from the archive.

Prerequisites

This guide requires the following prerequisites:

• .NET Framework 2.0 SP1 or greater

• Web Deployment Tool Beta 2

Note: If you have not already installed the Web Deployment Tool, see Installing the Web Deployment Tool.

To archive and restore an IIS 6.0 web site

1. To create an archive, run the following command:

msdeploy.exe -verb:sync -source:apphostconfig="Default Web Site" -dest:archivedir=c:\archive > webdeployarchive.log

2. To restore the archive, run the following command:

msdeploy.exe -verb:sync -source:archivedir=c:\archive -dest:metakey=lm/w3svc/1 > webdeployarchive.log

To archive and restore an IIS 7.0 site:

1. Run the following command:

msdeploy.exe -verb:sync -source:metakey=lm/w3svc/1 -dest:archivedir=c:\archive > webdeployarchive.log2. To restore the archive, run the following command:

msdeploy.exe -verb:sync -source:archivedir=c:\archive -dest:apphostconfig="Default Web Site" > webdeployarchive.log

Options for archiving multiple sites or objects

If you need to archive a second directory outside the scope of your web site, or you want to include other sites or objects, you have two options:

• Archive each of them separately

• Create a manifest file to archive multiple paths (see Using Custom Manifests)

Summary

You have now created an archive of a web site, and restored the site from the archive. This is useful if you need to revert to a prior version of the site, or if files have become corrupt or missing from the site’s content directory.

Comments

You must Log In to comment.

Page view counter