Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Archiving precious WAR before uploading new one using Tomcat 6 Manager

 
Piyush Mattoo
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am trying to archive the previous war file for a Java based web application before i deploy the latest one via the Tomcat 6 Manager web-interface. Would highly appreciate if anyone can throw some more light on achieving the same.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not be relying upon the deployment folder to retain a working copy. What I do is to always store all war files to a "vault" folder (protected by backups, of course), and copy the war file from there to the Tomcat deployment location. That way, the deployed war file is always superfluous, and if something happens to it, no problem, there's always a good copy waiting in the vault.

The war files are named with the deployment version, so there's never any ambiguity which war file is which.

It also make it easy to regress back to a previous version if ever need be,
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually use Maven to build webapps these days.

Maven is designed to allow the complete re-creation of any designated release of a software package "forever". I say that in quotes because if one or more of the dependency suppliers changes things that shouldn't be changed (or goes offline), then the process breaks down, but the agreement is that they shouldn't be doing that.

So as long as you have a VCS copy of the application source, including the POM, you can reconstruct the WAR on-demand. Byte for Byte, as long as you have your dependencies wired properly and as long as your dependency suppliers behave.

For shorter-term recovery, however, also have other alternatives. I post my Maven builds to a Nexus server, which keeps the various versions.

For really short-term recovery, I also have another option. I build my releases as OS-installable packages (RPMs), which I then move to a directory on the server after I install them. If I have to regress, I just retrieve the earlier RPM and re-install it as a downgrade.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic