1

Im about to automate the deployment to a test-server and to the production.

I have a ci-server (build, compile, junit) and a artifact repository manager (stores the builds to deploy/publish).

Currently I can deploy with a script to the test-server (executed with the ci-server). No rollback, db-backups or db-updates currently. All servers have Suse (linux).

I want to know if there is a better way to deploy, with rollback - ability? Maybe a other freeware tool? Otherwise even just some notes would be helpful to figure out what i have to do to be able to make rollbacks and dont mess up the production.

user1338413
  • 2,471
  • 8
  • 29
  • 36

1 Answers1

6

Rolling back an application which includes a relational database is very tricky. Traditionally this is done by restoring from a backup, performed prior to the upgrade.

A more modern approach is to integrate a database migration tool, like liquibase, into your application's installation procedure. liquibase tracks each change to your database's schema which enables it to generate scripts for both upgrade and rollback.

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • when i made the plan for the deployment, i noticed liquibase as well. now a colleague has already the script for the backup and rollback, so Im wondering if I should just go with that or use the tool as Its more of use in future? Cant tell about the pros and cons currently. – user1338413 Jan 09 '13 at 08:41
  • @user1338413 Personally I would support both approaches. Restoring from backup (provided it's done correctly) takes you back to a known point in time. Problem is data loss, time between when the backup and the rollback. Having an additional capability to rollback schema changes (leaving the data in place) is very useful. Finally a tool like liquibase is invaluable for building dev and test systems – Mark O'Connor Jan 09 '13 at 08:58
  • "a tool like liquibase is invaluable for building dev and test systems". And for the production server? Or are there any difference between the envs? – user1338413 Jan 09 '13 at 09:09
  • @user1338413 Production as well. My point is that most people think only of production and forget about the importance of deplicating the setup of their systems – Mark O'Connor Jan 09 '13 at 20:44