Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to make a command line argument that will backup all my websites to a file which I can then move periodically to offsite backup location. I would need all the content and all the settings so in case of a server fault I can easily restore the setup again quickly.

I found this command msdeploy -verb:sync -source:appHostConfig='DefaultWebsite',computerName=server1 -dest:package='' -enableLink:AppPoolExtension

This looks nice and all, but I would need to make a command for each website. Is there a way to backup all sites (and future sites) in the same command?

share|improve this question
up vote 0 down vote accepted
msdeploy -verb:sync -source:webServer,computerName=server1 -dest:package='',encryptPassword=password123 

The -source:webServer does a complete backup of everything. App pools and other config values, including SSL certs (if you have any). The encryptPassword is required if you have SSL certs.

share|improve this answer
Also, -enableLink:AppPoolExtension adds some info about the app pool. – Anders Dec 22 '11 at 9:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.