Migrating from older version (5.6.x) to AEM 6.1


Perform the following steps to migrate AEM 5.6.1 to 6.1

Run all maintenance activities: 

  •  Data garbage collection, 
  • workflow purge, 
  • version purge,
  • consistency check, 
  • traversal check, 
  • tarPM optimization.


Make sure there is no error during maintenance activity. This is the KEY.

1. Stop the CQ 5.6.1 instance
2. Archive and delete all log files from logs folder
3. Check repository.xml if any custom login configuration then remove the same (If required)
4. Update the java version to 1.7+
5. Place AEM6.1 quickstart jar parallel to quickstart folder of CQ5.6.x
6. Unpack the quickstart jar by running:
java -jar cq-author-p4561.jar –unpack

Prepare for the migration:

  1. Run the below command

       java -jar cq-author-p4561.jar -v -x crx2oak

The step generates a file crx2oak.properties under crx-quickstart/crx2oak/
Update the logging level for upgrade log to “Debug” mode in the above generated file, then proceeded to next step.

   2. Run the jar with the same parameters second time to generate the OSGi           configurations needed for the data migration:

        java -jar cq-author-p4561.jar -v -x crx2oak

Verify the following configuration files generated to the path crx-quickstart/install
org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.cfg and
org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.cfg

org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.cfg
path=./crx-quickstart/repository/repository/datastore
minRecordLength=4096

org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.cfg
customBlobStore=true

Run the migration to CRX3

java -Xmx4096m -XX:MaxPermSize=2048M -jar cq-author-p4561.jar -v -x crx2oak -xargs -- -omigrate

Post migration , monitor Upgrade log and observe for below output which is correct.
***In Upgrade Log***
18.07.2015 08:55:56.729 *INFO* [com.adobe.granite.crx2oak.CRX2Oak] CRX2Oak.java:308
Conversion to SegmentNodeStore took 115408 msec
***Execution window***
Preparing to execute extension CQ5.6.1Upgrade6.1/crx-quickstart/opt/extensions
/crx2oak-quickstart-extension.jar
18.07.2015 08:54:01.103 *INFO* [com.adobe.granite.crx2oak.quickstart.extension.
Main] Main.java:151 Launched CQ5.6.1Upgrade6.1/crx-quickstart/opt/extensions/
crx2oak-quickstart-extension.jar, version 1.0.14, SHA1 checksum 86838d4c6aca9429
11cbfa97e37ef46fcedf7177.
18.07.2015 08:54:01.118 *INFO* [com.adobe.granite.crx2oak.quickstart.extension.
Main] Main.java:186 Using crx2oak.jar from CQ5.6.1Upgrade6.1\crx-quickstart\op
t\helpers\crx2oak\crx2oak.jar
18.07.2015 08:54:01.274 *INFO* [com.adobe.granite.crx2oak.quickstart.extension.
Main] Main.java:188 crx2oak version 1.2.10, SHA-1 checksum dbf845a76cb8eb0d05cc
e4494500dca75c381dce
18.07.2015 08:54:01.274 *INFO* [com.adobe.granite.crx2oak.quickstart.extension.
Main] Main.java:262 Preparing to migrate repository to TarMK
18.07.2015 08:54:01.290 *INFO* [com.adobe.granite.crx2oak.quickstart.extension.
Main] Main.java:320 Starting repository migration. Please monitor the progress
in the upgrade.log file.
18.07.2015 08:55:56.729 *INFO* [com.adobe.granite.crx2oak.quickstart.extension.
Main] Main.java:322 Finished TarMK migration in 115 seconds.
18.07.2015 08:55:58.625 *INFO* [com.adobe.granite.crx2oak.quickstart.extension.
Main] Main.java:338 Your instance was migrated to Apache Jackrabbit Oak. Please
make sure to start the upgrade by explicitly using the crx3,crx3tar run modes (
e.g. java -jar aem.jar -r crx3,crx3tar).

As you see last command does output which run mode to use
-r crx3,crx3tar to upgrade in the next step

****************
KEY : Before performing the Final Step - “Performing The AEM Upgrade”
- Delete the 5.6.x standalone jar under crx-quickstart/app/ and set permission to AEM to all
folders, each and every step.
chown –R aem:aem crx-quickstart .
****************

Final Step - “Performing The AEM Upgrade”: 

Execute the below command and constantly monitor the error.log and upgrade.log.
Command: java -jar cq-author-p4561.jar -r author,crx3,crx3tar

Most suitable command:
java –Xmx4096m -XX:MaxPermSize=2048M -jar aem-author-p4502.jar -r author,crx3,crx3tar

Verify the error log for “com.adobe.granite.repository.impl.CRX3RepositoryImpl Repository
started.” which clearly showed my repo started as crx3.
Line 1690: 18.07.2015 09:10:51.593 *INFO* [FelixStartLevel]
com.adobe.granite.repository.impl.CRX3RepositoryImpl Repository started.
Bundle Status – Make sure all the bundles are active.

6 comments:

  1. Way cool! Some extremely valid points! I appreciate you
    writing this post plus the rest of the website is also very
    good.

    ReplyDelete
  2. I have to thank you for the efforts you have put in penning this site.
    I am hoping to view the same high-grade content by you in the future as
    well. In truth, your creative writing abilities has motivated me to get my own, personal site now ;
    )

    ReplyDelete
  3. Can I just say what a relief to uncover somebody that truly
    understands what they're talking about on the web.
    You certainly understand how to bring a problem to light and make it important.
    More people have to read this and understand this side of your story.
    I was surprised you aren't more popular since
    you certainly possess the gift.

    ReplyDelete
  4. I really love your blog.. Pleasant colors & theme.
    Did you build this web site yourself? Please reply back as I’m wanting to create
    my own personal site and want to know where you got this from or
    exactly what the theme is named. Thank you!

    ReplyDelete
  5. Hi, I do think this is a great web site. I stumbledupon it ;) I
    am going to return once again since I book-marked it.
    Money and freedom is the best way to change, may you be rich and
    continue to guide other people.

    ReplyDelete
  6. Howdy, I think your web site could possibly be having web browser compatibility issues.

    Whenever I look at your site in Safari, it looks fine but when opening in I.E., it's got some overlapping issues.
    I simply wanted to give you a quick heads up! Besides that, great website!

    ReplyDelete