I need to take the backup of the running application on the JBoss EAP 7.1. I tried through the Management Console but didn’t find any way to download or save the running code of applications. I found a solution through the command line, I tried and it worked for me.
Problem
- How to save/download a deployment deployed in JBoss EAP 7.1 content repository
- Can retrieve the deployment from the JBoss host server in any way
Solution
In JBoss EAP 7.1, there was a feature added that allows saving a deployment from the JBoss EAP content repository. Follow the process as given below:
- Login to the server and go to directory /opt/EAP-7.1.0/bin/
[root@dbappweb ~]# cd /opt/EAP-7.1.0/bin/ [root@dbappweb bin]# ll jboss-cli.sh -rwxr-xr-x. 1 root root 2473 Nov 4 2017 jboss-cli.sh
- Run the jboss-cli.sh script and connect to the JBoss standalone server
[root@dbappweb bin]# ./jboss-cli.sh You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands. [disconnected /] connect dbappweb:9990
- List the deployed applications (*.war)
[standalone@dbappweb:9990 /] ls deployment test.war app.war
- Now execute the below command, it will save the test.war deployment to /home/sonu/test.war
[standalone@dbappweb:9990 /] attachment save --operation=/deployment=test.war:read-content() --file=/home/dbappweb/test.war File saved to /home/dbappweb/test.war
Reference:
https://access.redhat.com/solutions/3392691
Last Updated: February 07, 2019