0

I am looking for a functionality where I can take a snapshot or archive the specific set of data in database and whenever requried I need to go back to the archived state, how can I achieve this ? for more clarity on the need, below is the detail example.

I have a production server and test server, I have made some settings/configuration to my application in test server and updated the production server. Before updating the production server, I should archive/snapshot the data that is being updated, so that if something goes wrong in updating I should be able to go back to the previous state of data in production server.

Thanks in Advance.

Abhinay
  • 338
  • 1
  • 7
  • 22

1 Answers1

0

Sometimes solutions are complex and difficult, but this one is very simple. Just make a backup of the database and if something goes wrong, you can restore the backup.

You can definitely write tools around this process to make it fairly automated.

ryan1234
  • 7,237
  • 6
  • 25
  • 36
  • end user doesn't want to take backup of database as user has to take complete backup even tough if user is updating just few records in table. So, looking for a solution where I can go to previous state without taking database backup. – Abhinay Aug 14 '13 at 11:51
  • Without doing a backup, one solution I can think of is to version each record in the database. Add a version field to every table and keep all historical versions of data as they get changed/inserted/etc. Then you can revert to a given version - or have all queries in the database reference a given version when executing. You can also run jobs to clean out old versions that you don't need to roll back to. Feels like a gross/hack solution, but it could work. – ryan1234 Aug 14 '13 at 17:29