Reputation: 535
I got a new job to maintain a java web application that was already deployed on wildfly 10. They do not have a backup of the application. In wildfly web interface, I found no option for downloading the EAR file.
Please guide me if there any way to download EAR file from wildfly web interface or terminal?
Thanks
Added Later:
CLI Attachment command is not available.
Upvotes: 0
Views: 2252
Reputation: 1
In Wildfly 9 there are some folders named data. In them there are some directories with a name in hexadecimal.
Like: /wildfly/standalone/data/content/0d/bd50f8f78f3e1d99f9eca38a60c4a7d3ed31c8
Here are a file named content that is a app.
To make sure that it is the file you are looking for, you will have to find an XML where that code is, and it will tell you the name of the application. If you rename it, you can make the backup.
Something like:
<deployment name="app.jar" runtime-name="app.jar">
<content sha1="0dbd50f8f78f3e1d99f9eca38a60c4a7d3ed31c8"/>
</deployment>
In my case are standalone.xml, but sometimes it`s domain.xml
Upvotes: 0
Reputation: 155
You can download the war/ear file using JBoss CLI.
1. [user@user bin]$ cd /opt/$EAP_HOME/bin/
2. [user@user bin]$ ./jboss-cli.sh -c [standalone@localhost:9990 /]
3. [standalone@localhost:9990 /] ls deployment test.war
4. [standalone@localhost:9990 /] attachment save --operation=/deployment=test.war:read-content() --file=/home/user/test.war File saved to /home/user/test.war
Upvotes: 1