Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It seems that the pertinent question here is:</p> <ul> <li>Why would a scripted rollback ever be preferable to a full database restore from a backup taken immediately before the upgrade?</li> </ul> <p>I can think of several reasons:</p> <ol> <li><p>The database is very large - say a few hundred GB - and your company cannot afford the downtime and/or administrative overhead that would be involved in a full restore.</p></li> <li><p>A bug was introduced that was not discovered until a week or two into production. If you've never experienced this before, you're lucky. Once you've got a week's worth of transactions in the new database, you can forget about just restoring from backup.</p></li> <li><p>The bug was not discovered until <em>months</em> into the release. In other words, you don't even <em>have</em> the backup anymore, and you're officially in damage control/disaster recovery mode. I've never experienced this, but I've heard stories. It's a scary thought - how do you undo all the damage that was done? In this case your downgrade might not be perfect, but it might still be better than the alternative.</p></li> <li><p>By contrast, perhaps the database changes were trivial - adding a few rows here, a few triggers there. In this case, a scripted rollback is going to take <em>much</em> less time than a restore. It's possible that some things that took hours to upgrade - such as creation of new indexes or addition of new columns - may only take seconds to downgrade (drop).</p></li> <li><p>You're deploying to customer sites. Some of them may not have backups at all (yeah, it's pathetic, but there's nothing you can do about it). If one of them needs a rollback, this is your only option.</p></li> </ol> <p>There may be other reasons to have downgrade scripts - this is just off the top of my head.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload