Database Rollback

Database Rollback is the process of reverting database changes to an older version. Rollback the database will restore past database data, that has been deployed to your website. Database Rollback needs to be done for a variety of reasons, such as failed deployment or unacceptable website condition that might be caused by the database. This can be done in Azure DevOps and must do it manually.

Rollback Restore DB

To rollback database to the previous version can use DB-Restore pipeline. Doing rollback database using DB-Deploy pipeline will only execute the previous SQL script.

Here’s how to do it.

  1. In Pipeline >> Releases there is option for rollback database
    <subscription-name>-DB-Restore-STG.CD
    for rollback database in Staging.
    <subscription-name>-DB-Restore-PRD.CD for rollback database in Production.
  2. Select which database that you want to rollback. For example, we select want rollback Staging database as shown in the image.
  3. Click the database release.
  4. Put your cursor in the stage box and click redeploy.
  5. Wait until your deployment success and it’s done.
After the database is restored database schema and data will be replaced by the previous database version.