Database backup and restoration

120 Views Asked by At

I am developing a stock/e-commerce web application. We have been using a version of our software for a while now, and we are ready to introduce some new entities in our database and change the schema a bit. The problem is that I do not want to lose any data, yet if I do a simple backup, then set up the new version of our software, the schema will change significantly. Adding columns for joins, etc. I've never really done this, but is there any way I can backup all data then restore it to a slightly different schema making some adjustments? like renaming a column etc.

1

There are 1 best solutions below

0
On BEST ANSWER

I could say it should be part of the development process to create 'migration' scripts from one release to another, test them and then apply a migration copy of the production database one change at the time (check for Continuous Database Integration or Evolutionary Database Design patterns). We use this approach every time we make an big schema change to something that has already been deploy to production and has worked for us like a charm. Just my $0.02.