I think my needs are relatively simple so I hope someone should easily be able to help. I need to back up the entire IIS configuration so that IIS can be restored on another computer.
My first backup strategy was to use this command:
AppCmd.exe Add Backup
I soon abandoned that because it only works when restoring to the same computer where the backup was made. You can't copy the files and restore on another computer because the backup does not include the server encryption keys.
My current backup strategy is to use Shared Configuration. I'm not actually sharing the IIS configuration between 2 servers. I'm just using this feature to store the IIS config, including encryption keys, in one folder that I can include in my daily backup. I have been doing this for several years and it works really well. I have been able to restore the entire IIS configuration when migrating the entire web server to another machine many times.
But now there is a problem. We want to start using Application Request Routing and that is not compatible with Shared Configuration. So I'm looking for another way to back up the IIS config and I'm considering MSDeploy. I'm able to successfully
generate the config to a folder (I think) but not restore.
I'm using this command to backup on Windows Server 2008:
msdeploy.exe -verb:sync -source:webserver -dest:archiveDir=c:\archive,encryptPassword=secret_password -disableLink:ContentExtension
I'm using this command to restore on a new Windows Server 2012 server:
msdeploy.exe -verb:sync -source:archiveDir=c:\temp\deploy,encryptPassword=secret_password -dest:webserver
When I try to restore, the output terminates with these errors:
Error: Value cannot be null. Parameter name: value
The output fails to say what value is null that should not be.
Can anyone help me write the msdeploy command so that I can backup the entire IIS configuration and restore on another machine? Note that I want to back up only the IIS configuration; I don't need to back up other data like web site content files. I am already backing up other critical files.
Or if you can recommend another backup method, please do.
Cam