How to rollback individual or cumulative patches in JBoss EAP 6/7
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
- 6.x
Issue
- How to rollback individual or cumulative patches?
- Can you back out a patch once you've applied it?
- Is there a patch to downgrade from a particular version of EAP?
- Is there any JBoss CLI command for removing all patches included in 6.3.3 patch bundle?
- How to remove JBoss EAP 7.2.8 patch set? How to reverse to CP 7?
Resolution
There is no patch for downgrading, however, the rollback option can be used to reverse to the last patch (cumulative patch).
- To facilitate patch management with zip-based installations, Red Hat has added a new
patchcommand in the JBoss CLI. Use this command to rollback previously installed patches:
patch rollback --patch-id=<patch-id> --reset-configuration=<true|false>
- The following details explain the variable information for the
patch rollbackcommand:
-
--patch-id=<patch-id>
The identifier for the patch you wish to rollback that can be obtained through the use of thepatch infocommand.
The option might not listed in tab-completion in later version, here the patch-id can be used as is without the --patch-id option given. -
--reset-configuration=<true|false>
If set to true, the patch rollback process will also rollback the server configuration to its pre-patch state. Any changes that were made after the patch was applied will be lost.If set to false, the server configuration will not be rolled back. In this situation, it is possible that the server will not start after the rollback, as the patch may have altered configuration parameters, such as namespaces, which may no longer be valid and have to be fixed manually.
-
Please note that rolling back a patch using the
patchcommand is not intended for general use. It is only intended to be used immediately after the application of a patch which had undesirable consequences. -
The JBoss EAP 7.2 Installation Guide and the solution How do I apply individual or cumulative patches for zip-based installations of JBoss EAP 6.2 and later? provide more data to
apply patch.
Example usage reverting from patch CP 8 on JBoss EAP 7:
[standalone@localhost:9990 /] patch rollback --patch-id=jboss-eap-7.2.8.CP --reset-configuration=false
{
"outcome" : "success",
"response-headers" : {
"operation-requires-restart" : true,
"process-state" : "restart-required"
}
}
Note: For JBoss EAP 6.x the rollback command example in the above guide is wrong. There is already a This content is not included.Bugzilla-1011460 filed for this. --patch-id parameter is required.
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.