Categories
mysql oracle postgresql rdbms sql-server

How to Deploy Database Changes to a Live Server?

I have a script that is part of my deployment process to push DB changes to the production server. If the script corrupts my data for some reason (a bad update), it is tough to recover.

One way to solve this is to shut down the application to users while updating, so if a problem occurs, just go back to the backup I made before deploying.

But I have heard of others who deploy and keep their site live… how would you go about doing this, and if you failed, how could you recover the data that came in since you took your backup before deploying?