Back to the blog
Technology

How to Upgrade Adobe Experience Manager to Version 6.5?

author image

Akshay Rathnavas

Date posted: July 09, 2020

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.

  1. Ensure sufficient disk space on the server.
  2. Fully Back up AEM.
  3. Backup changes to the /etc file.
  4. 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.

  5. Provide executable permissions to all the scripts at crx-quickstart/bin and crx-quickstart/monitoring This is required to perform the remaining upgrade steps.
  6. Install, configure, and run pre-upgrade tasks:

    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.

  7. Remove updates from /install directory.
  8. Stop any cold standby instances.
  9. Disable custom scheduled jobs.
  10. Execute offline revision cleanup.
  11. 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  
      
  12. Delete users that might hinder the upgrade.
  13. Rotate log files.

In-Place Upgrade

  1. Ensure the Java version is up to date.Minimum Recommended JDK 11 or above.
  2. 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  
      
  3. 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.

  4. 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

  1. Run aem using the new jar.
  2. 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!

Upgrading to AEM 6.5
Upgrade Procedure Performing an In-Place Upgrade
Post Upgrade Checks and Troubleshooting

Browse all categories