AEM 6.4 upgrade

AEM Upgrade

I have upgrade from AEM 6.2 to 6.4 one of my reputed client. This article covers both upgrade strategies and steps required to do them successfully.

Pre-requisite steps for upgrade

  • Release notes
  • Technical Requirements
    • Adobe recommended lists the supported client and server platforms for Adobe Experience Manager which need to upgrade.
Application/ServerVersion
AEM6.4
Apache2.4
Dispatcher4.2.2
Jdk1.8.0_221
Oak1.8.2
  • Pre-Upgrade maintenance tasks
    • Before beginning your upgrade, it is important to follow these maintenance tasks to ensure that the system is ready and can be rolled back should issues occur.
      • Execute pattern detector and get the report for where we need to do customization or update.
      • Ensure Sufficient Disk Space
      • Fully Back Up AEM
      • Back Up Changes to /etc
      • Configure Workflow and Audit Log Purging
      • Install, Configure, and Run The Pre-Upgrade Tasks
      • Execute Offline Revision Cleanup
      • Execute Data store Garbage Collection
      • Rotate Log Files

Upgrade approaches

There are two type of upgrade approaches
  • In place upgrade
  • Fresh Installation

In Place Upgrade

  • Stop the existing instance eg: AEM 6.2
  • Remove log files from environment
  • Take a backup of quickstart folder
  • Run Offline revision cleanup or offline compaction
    • Download correct oak-run jar compatible with AEM6.2 from below URL https://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run/
    • Shutdown AEM if running
    • (Optional) Use the tool to find old checkpoints: java -jar oak-run-1.4.9.jar checkpoints install-folder/crx-quickstart/repository/segmentstore
    • (Optional) Then, delete the unreferenced checkpoints: java -jar oak-run-1.4.9.jarr checkpoints install-folder/crx-quickstart/repository/segmentstore rm-unreferenced
    • Run the compaction and wait for it to complete: java -jar -Dlogback.configurationFile=logback.xml -Xmx8g oak-run-1.4.9.jar compact install-folder/crx-  quickstart/repository/segmentstore
    • After executing compaction the repository size has been reduced from 19 GB to 2.69 GB
    • Replace AEM6.2 jar with AEM 6.4
    • Preparation of the AEM quickstart jar file java -Xmx4096m -jar aem6.4_quickstart-author-p4502.jar –unpack
    • Execute repository migration command java -Xmx4096m -jar aem6.4_quickstart.jar -v -x crx2oak -xargs — –load-profile segment-no-ds
    • Determine the correct upgrade start command. After migrate start AEM with below command java -Xmx8g -Djava.awt.headless=true -Dsling.run.modes=author,crx3,crx3tar -jar aem6.4_quickstart.jar -p 4502 -verbose -nofork -gui -Dsling.properties=conf/sling.properties

Fresh Installation

Software Installation:

Be sure to install and configure the following:
  • Install AEM using the version 6.4 JAR file. (AEM_6.4_Quickstart.jar)
    • Copy your Jar file in your dev location.
      • You will also need to copy in the license.properties file.
      • Double clicking the jar file will install and launch the server.
      • See Debugging for launching the server in debug mode so you can debug using your IDE.
    • Local Author instance should be running on port 4502 (AEM_6.3_Quickstart.jar)
  • Java/JRE 1.8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
    • From command line, run ‘java -version’ to confirm your java version is 1.8
  • Apache Maven 3.5.3: http://archive.apache.org/dist/maven/maven-3/3.5.2/binaries/
    • From command line, run ‘mvn -version’ to confirm your maven version is 3.X
    • Make sure you download the binary.
  • Eclipse latest version (java EE): https://www.eclipse.org/downloads/
    • NOTE: Those who have an IntelliJ license or prefer another IDE may use then but note that this document will not support the setup

Post Upgrade Checks

  • Repository is migrated properly. (Below completion message will appear)

(05.06.2018 09:26:28.353 INFO   c.a.g.c.e.MigrationRunner: migration completed )

 __   __         __        ___ ___  ___  __

/  ` /  \  |\/| |__) |    |__   |  |__  |  \

\__, \__/  |  | |    |___ |___  |  |___ |__/

  • Oak version is 1.8.2
Oak version
  • Check product info
AEM product info
  • Check the runmode
Apache sling settings
  • AEM 6.4 system overview
AEM system info
  • Site.html, login.html is working
  • Crxde , crx explorer, felix console are working
  • Some of the dependencies has been changed in pom files
aem-maven-tooling/global-parent/pom.xml

<dependency>
        <groupId>com.adobe.aem</groupId>
       <artifactId>uber-jar</artifactId>
       <version>6.2.0</version>   DELETED
       <version>6.4.0</version>   ADDED
       <classifier>apis</classifier>
       <scope>provided</scope>
</dependency>

acs-commons version modified

<acs-aem-commons.version>3.13.0</acs-aem-commons.version>  DELETED

<acs-aem-commons.version>3.17.0</acs-aem-commons.version>  ADDED