Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to backup existing database and website as part of a MSDeploy package?

I am researching one-click deployment with Visual Studio 2010, the current deployment process involves zipping up the contents of the IIS folder and taking a backup of the current database before completing the remaining manual deployment steps. This allows us to roll back a deployment, I need to retain the essence of this process if not the specifics.

Is there a way of automating this with MSDeploy?

like image 267
Richard Slater Avatar asked Nov 14 '22 09:11

Richard Slater


1 Answers

You can have MSDeploy execute a batch file that backs up the IIS directory (see example)

You can also write some SQL, put it in a .sql file, execute the SQL script in the batch file as well. See this example to at least get a start. It is for SQL server, but if you are not using that then hopefully the database you are using has something similar.

like image 87
kniemczak Avatar answered May 09 '23 14:05

kniemczak