How to Upgrade Adobe Experience Manager to Version 6.5?
From core library updates to support for newer JDK versions, AEM version 6.5 is a feature-packed upgrade. In this article, we are sharing the step by step upgrade process that we developed and followed to successfully transition many of our enterprise clients into AEM version 6.5.
I have split this article in to the following three sections for ease of following,
Pre-upgrade Maintenance Tasks
In-Place Upgrade
Codebase Upgrade
Pre-upgrade Maintenance Tasks
One of the most common reasons for upgrades going wrong is, a pre-upgrade was either skipped or not done right. To ensure you don't run into that, I have curated a list of maintenance tasks you should take care before starting to upgrade.
These tasks prepare your AEM instance for the upgrade. Make sure to complete these steps before proceeding to the In-place upgrade.
- Ensure sufficient disk space on the server.
- Fully Back up AEM.
- Backup changes to the
/etc
file. -
Generate
quickstart.properties
file.Note: When starting AEM from the jar file, a quickstart.properties file will be generated under
crx-quickstart/conf
. If you have started AEM only with the start script in the past, this file will not be present and the upgrade will fail. If this file is not present, restart AEM from the jar to generate it. - Provide executable permissions to all the scripts at crx-quickstart/bin and crx-quickstart/monitoring This is required to perform the remaining upgrade steps.
-
Install, configure, and run pre-upgrade tasks:
- Install the jar for pre-upgrade-tasks-content-cq60-0.0.2 from Adobe package share.
- Open JMX Console from the following location: https://serveraddress:serverport/system/console/jmx
- Open
"preupgradetasks"
, and runrunAllPreUpgradeTasks()
.
Note: In case there is a surge in disk space, it is due to a known bug in AEM 6.1. To rectify this, follow these steps.
- Remove updates from
/install directory
. - Stop any cold standby instances.
- Disable custom scheduled jobs.
- Execute offline revision cleanup.
-
Download org/apache/jackrabbit/oak-run
- After making sure that you have a recent backup of the AEM instance, shut down AEM.
-
Use the tool to find old checkpoints:
java -jar oak-run.jar checkpoints
install-folder/crx-quickstart/repository/segmentstore
-
Delete the unreferenced checkpoints:
java -jar oak-run.jar checkpoints
install-folder/crx-quickstart/repository/segmentstore rm-unreferenced
-
Run the compaction and wait for it to complete:
java -jar -Dsun.arch.data.model=32 oak-run.jar compact
install-folder/crx-quickstart/repository/segmentstore
- Delete users that might hinder the upgrade.
- Rotate log files.
In-Place Upgrade
- Ensure the Java version is up to date.Minimum Recommended JDK 11 or above.
-
Prepare the AEM Quickstart jar file:
- Stop the instance if it is running.
- Download the new AEM jar file and use it to replace the old one outside the crx-quickstart folder.
-
Unpack the new quickstart jar by running the following command:
java -Xmx4096m -jar aem-quickstart.jar -unpack
-
Content Repository Migration:
java -Xmx4096m -jar aem-quickstart.jar -v -x crx2oak -xargs -- --load-profile segment-no-ds
Note: Visit Adobe’s documentation here for commands tailor-made to your repository.
IMPORTANT: If there is an error in moving files, you’ll get a warning to move it manually. Execute those commands to move the files, in the GIVEN ORDER.
-
Run the one time startup command:
java -server -Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true -Dsling.run.modes=author, crx3,crx3tar -jar AEM_6.5_Quickstart.jar -c crx-quickstart -p 4502 -Dsling.properties=conf/sling.properties
Note: In case there is trouble in running the new command, add the flag
-Dcom.adobe.upgrade.forcemigration=true
for java in the command line during the startup.
Codebase Upgrade
- Run aem using the new jar.
-
Deploy Upgraded Codebase:
- Update Maven.
- Latest Uber JAR.
- Update POM.
- Deprecated API Usage Detection.
- Convert Services to Declarative Services.
- Change Usages of Administrative Resource Resolver (Configure and Use Service Users instead).
- Convert dialog if required using this tool.
- Node restructuring(
/etc/
need to be moved into/libs/ or /content/ or /conf/
) - Refactor Custom Workflow Integration.
Hope our practical guide helped you successfully migrate. Do share it with your peers and if you ran into an issue we have not caught, do send it our way. After all, we are always learning!
Recommended Reading
Upgrading to AEM 6.5
Upgrade Procedure
Performing an In-Place Upgrade
Post Upgrade Checks and Troubleshooting