Recovering a deployment content in JBoss EAP 6.x and 7.0
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 7.0
Issue
- How do I recover the
war
orear
files after deployment? - Where are the deployed
war/ear
files stored?
Resolution
Standalone Mode
ear
and war
files deployed by Deployment Scanner
can be recovered from the /deployment
directory
${EAP_HOME}/standalone/deployments
If the application was deployed using JBoss CLI
or using the Web Console
then it can be recovered from
${EAP_HOME}/standalone/data/content/xx/xxxxx/content
The final content
file can be copied out and renamed to original_name.war
.
The xx/xxxxx
part is based on the sha1 hash of the war file that can be found in the <deployments>
section of standalone.xml
or domain.xml
.
For example
<deployments>
<deployment name="jboss-helloworld.war" runtime-name="jboss-helloworld.war">
<content sha1="1e4142ff9fea7342e3ab83c8bc9add5a7d63042f"/>
</deployment>
</deployments>
Would result in a directory named
${EAP_HOME}/standalone/data/content/1e/4142ff9fea7342e3ab83c8bc9add5a7d63042f/content
Domain Mode
Deployment Scanner
is only available in Standalone Mode
so there is no /deployments
folder in Domain Mode
that allows recovery of the deployed files.
For the CLI, the instructions are the same as standalone, but the content root directory is found in
${EAP_HOME}/domain/data/content
Note: in case of using the 7.1 version refers to Recovering a deployment content in JBoss EAP 7.1 and later article.
Root Cause
- Although the content file can be renamed to a war file, we do not recommend the use of this method for recovery.
- The best approach is to always keep a copy of the original file.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments