we're trying to deploy a website with "Web Deploy Package". The Deploy itself goes fine. We want automatically create a Backup of the site. If the Deploy fails (e.g. Network Connection breaks, power blackout, apocalypse), we want to restore the backup when we can reach the webserver again.
We create a Web Deploy Package in Visual Studio by publishing the site. A application on a Server recieves the Web Deploy Package files and publishes them via process-class to a Server by a seperate config-file (serveraddress, credentials etc.)
p = new Process();
info = new ProcessStartInfo("cmd.exe");
info.WorkingDirectory = extractPath;
info.Arguments = @"/c=WebUI.deploy.cmd /t /m:https://" + adresse + ":8172/MSDeploy.axd /u:" + benutzer +
" /p:" + kennwort + " /a:basic -AllowUntrusted ";
info.RedirectStandardOutput = true;
info.UseShellExecute = false;
p.StartInfo = info;
We activated the auto-backup feature like described here We're using a IIS Manager Account to get the job done. So far, everything works fine. But there are no Backups. We don't want to use a Windows Account for this job. I assume we need to give another parameter within our code.
Thank you!
[EDIT] When we use Windows-Administrator credentials, the backup works. We need to use a IIS Manager Account for this process. How can we grant Write-Permission to the "..._snapshot" - Folder to the IIS Manager User?
[Edit 2] When we add the "backupManager" - rule to a provider, where the Username is WDeployAdmin in the "Management Service Delegation" of IIS, the backup is also going fine. But a) we don't want to change the "Management Service Delegation" - configuration of the IIS-Server of our Customers and b) we don't have the password for the WDeployAdmin user to create a rule ourselves.
Do we need a Windows Account for msdeploy to get the backup done automatically? :-(