Chapter 7. Reverting your JBoss EAP server updates using the Management CLI
You can revert updates applied to your JBoss EAP server using the Management CLI. To revert the changes applied to your JBoss EAP server, use the installer history
command to view the previous versions of JBoss EAP installations on your server. Once you have confirmed the correct version of JBoss EAP you want to revert to, prepare a candidate server using the installer revert
command. After preparing the candidate server, restart your JBoss EAP server to complete the revert process.
For more information see how to view the history of JBoss EAP installations on your server.
7.1. Reverting your JBoss EAP server updates in a stand-alone server or a managed domain
You can revert your JBoss EAP server installation in a stand-alone server or a managed domain using the JBoss EAP Management CLI. The following steps outline the phases of the revert process.
-
Prepare revert: In this phase, the JBoss EAP installation is prepared for the revert on the target machine. The candidate server is prepared in the server temporal directory, which is the directory represented by the file system path
jboss.domain.temp.dir
in a managed domain orjboss.server.temp.dir
in stand-alone server mode. Once this phase is completed, no further server preparations can be performed on the same candidate server. However, you can clean the installation manager cache, which allows you to prepare a different installation if needed. For more information, see Cleaning the installer. - Apply revert: Once you have completed the revert process, restart your JBoss EAP server to apply the candidate server prepared to revert your installation.
Procedure
Launch the Management CLI:
EAP_HOME/bin/jboss-cli.sh
Revert your JBoss EAP server:
NoteUse the installer history command to view the installation state you want to revert your installation to.
Revert your JBoss EAP server updates in a stand-alone server:
[standalone@localhost:9990 /] installer revert --revision=abcd1234
Revert your JBoss EAP server updates in a managed domain:
[domain@localhost:9990 /] installer revert --host=target-host --revision=abcd1234
NoteFor more information about additional command options use the help command.
Restart your JBoss EAP server to complete the revert process:
NoteYou must ensure that no other processes are launched from the
JBOSS_EAP/bin
folder, such asJBOSS_EAP/bin/jconsole.sh
andJBOSS_EAP/bin/appclient.sh
, when restarting the server with the--perform-installation
option. This precaution prevents conflicts in writing files that might be in use by other processes during the server’s revert.Restart your JBoss EAP server in a stand-alone server:
[standalone@localhost:9990 /] shutdown --perform-installation
Restart your JBoss EAP server in a managed domain:
[domain@localhost:9990 /] shutdown --host=target-host --perform-installation
Additional resources
7.2. Reverting your JBoss EAP server installation offline using the Management CLI
The following example describes how to use the Management CLI to revert your JBoss EAP installation offline in a stand-alone server and a managed domain. This is useful in scenarios where the target server installation lacks access to external Maven repositories. You can use the Management CLI to revert your JBoss EAP server installation. To do so, you need to specify the location of the Maven repository that contains the required artifacts to revert your server. You can download the Maven repository for your update from the Red Hat Customer Portal.
Prerequisite
- You have the Maven archive repository containing the required artifacts locally on your machine.
Procedure
Launch the Management CLI:
EAP_HOME/bin/jboss-cli.sh
Revert JBoss EAP installation offline:
Revert JBoss EAP installation offline in a stand-alone server:
[standalone@localhost:9990 /] installer revert --revision=abcd1234 --maven-repo-files=<An absolute or a relative path pointing to the local archive file that contains a maven repository>
Revert JBoss EAP offline in a managed domain:
[domain@localhost:9990 /] installer revert --host=target-host --revision=abcd1234 --maven-repo-files=<An absolute or a relative path pointing to the local archive file that contains a maven repository>
NoteFor more information about additional command options use the help command.
Restart your JBoss EAP server to complete the revert process:
NoteYou must ensure that no other processes are launched from the
JBOSS_EAP/bin
folder, such asJBOSS_EAP/bin/jconsole.sh
andJBOSS_EAP/bin/appclient.sh
, when restarting the server with the--perform-installation
option. This precaution prevents conflicts in writing files that might be in use by other processes during the server’s revert.Restart your JBoss EAP server in a stand-alone server:
[standalone@localhost:9990 /] shutdown --perform-installation
Restart your JBoss EAP server in a managed domain:
[domain@localhost:9990 /] shutdown --host=target-host --perform-installation