Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Upgrade from 6.0 to 6.5 - Continued

kevingtan
Level 3
Level 3

Hi all,

 

I like to ask a question about an upgrade from 6.0 to 6.5. In short, is there a tool that can migrate the 6.0 content to 6.5 in a separate server, and expect minimal fix?

 

I asked the same question before in a more elaborate fashion, https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/upgrading-from-aem-6-0-to-.... We had an internal discussion about it and still have some questions.

 

Our Repository is Apache Jackrabbit Oak 1.0.22 on AEM 6.0 with sp1, sp2 and sp3. We like to upgrade from 6.0 to 6.5. I read through all the pros and cons of the in-place and fresh installation, and still don't know which one will be better.

Our goal is to transfer all the jsp/jstl to HTL, but it's fine to keep the classic. The most important thing is the content migration. If we rewrite it, the templates paths, references, components repo, etc. will change significantly. I am wondering how the migration tool will handle this. If we rewrite a 6.5 project and install it on a new server, is it possible to copy the old content to the new server? Or any other solution is better than this?

 

Thank you very much!

 

-kevin t

1 Accepted Solution
shya
Correct answer by
Level 2
Level 2

Hi @kevingtan,

 

Please use crx2oak on fresh installation of AEM6.5 to migrate all the content from 6.0 to 6.5, since AEM6.3 onwards new format for Segment Store has been introduced hence content migration is required.  Chose right version of crx2oak jar which has been release with every version of AEM. 

There would be downtime required for this activity and will take time as per your repo size.

 

Perform below steps:

1. Copy source and destination repository at the same server location to avoid network issues

2. Have Fresh destination  server

3. Identify the location of source crx-quickstart, datastore, destination crx-quickstart, and datastore.

4. Copy crx2oak jar file and keep it at source server/location under /app/crx2oak .

5. Create 2 blank log files crx2oak.log and migration.log under /app/crx2oak folder

6. Download logback.xml and save it at /app/crx2oak (get logback.xml from this Link )

Now you are ready to run the crx2oak command with options of parameters, I am sharing one such example which I used recently

 

java -Dlogback.configurationFile=logback.xml -Xmx8192m -XX:MaxPermSize=2048M -jar crx2oak-1.10.0-all-in-one.jar --copy-versions=true --copy-orphaned-versions=true --fail-on-error=true /app/tar/crx-quickstart/repository /author_lcoation/crx-quickstart/repository --src-datastore=/datastore_location/datastore/daily_datastore --datastore=/app/datastore/current_datastore --include-paths=/content/dam/project_root_dam,/content/project_content_root,/jcr:system/jcr:versionStorage > /app/crx2oak/crx2oak.log &

 

You can see other options associated with crx2oak at this url .

 

Please let me know if you need more information around it.

 

Regards

Shya

View solution in original post

1 Reply
shya
Correct answer by
Level 2
Level 2

Hi @kevingtan,

 

Please use crx2oak on fresh installation of AEM6.5 to migrate all the content from 6.0 to 6.5, since AEM6.3 onwards new format for Segment Store has been introduced hence content migration is required.  Chose right version of crx2oak jar which has been release with every version of AEM. 

There would be downtime required for this activity and will take time as per your repo size.

 

Perform below steps:

1. Copy source and destination repository at the same server location to avoid network issues

2. Have Fresh destination  server

3. Identify the location of source crx-quickstart, datastore, destination crx-quickstart, and datastore.

4. Copy crx2oak jar file and keep it at source server/location under /app/crx2oak .

5. Create 2 blank log files crx2oak.log and migration.log under /app/crx2oak folder

6. Download logback.xml and save it at /app/crx2oak (get logback.xml from this Link )

Now you are ready to run the crx2oak command with options of parameters, I am sharing one such example which I used recently

 

java -Dlogback.configurationFile=logback.xml -Xmx8192m -XX:MaxPermSize=2048M -jar crx2oak-1.10.0-all-in-one.jar --copy-versions=true --copy-orphaned-versions=true --fail-on-error=true /app/tar/crx-quickstart/repository /author_lcoation/crx-quickstart/repository --src-datastore=/datastore_location/datastore/daily_datastore --datastore=/app/datastore/current_datastore --include-paths=/content/dam/project_root_dam,/content/project_content_root,/jcr:system/jcr:versionStorage > /app/crx2oak/crx2oak.log &

 

You can see other options associated with crx2oak at this url .

 

Please let me know if you need more information around it.

 

Regards

Shya

View solution in original post

kevingtan
Level 3
Level 3
Thank you very much! It's very helpful! So even if it's a fresh installation, one still has to copy the crx-quickstart directory from 6.0 to the new server in order for the content migration?
markus_bulla_adobe
Employee
Employee

Hi @kevingtan!

 

Please let me point you to my comment in another thread on the topic of AEM upgrades.

You will see that I outlined different phases for the upgrade from a development point of view:

  • Migrating the existing platform (6.0 to 6.5 in your case) - basically updating the dependencies (primarily: the AEM uber jar) and getting your existing application and website running on the new product version.
  • Source code modernization - projects that have been developed for older versions of AEM usually have quite some "legacy" code that does not reflect the latest development best practices and recommended patterns. One that seems to be a priority on your list is refactoring your code to use HTL instead of JSP/JSTL. That's a good idea, though not a mandatory requirement. Anyways refactoring your existing code base to modernize it should be on your list.
  • Adapting new features - newer versions of AEM come with additional features that you may want to leverage, such as editable templates, content and experience fragments and many more. You may want to check the "What's new" section of the release notes for the latest versions of AEM.

 

Looking at the upgrade procedure and content migration, there is also an existing thread that I would like to point you to.

Citing from my comment on that thread:

There are different approaches to upgrade from older AEM versions to newer ones.

  • In place upgrade - basically stopping your instance, replacing the quickstart.jar with the newer version and starting it again.
  • Upgrade to a new environment - setting up a new environment with the target version and migrating your project (content, code, configurations, etc.) to that new environment.

From my experience the most reliable and clean way is a combination of these two approaches:

  • Setup a new, clean environment with the target version.
  • Perform an in-place upgrade on the old environment.
  • Migrate everything from the old to the new instance (e.g. using the crx2oak tool).

The upgrade process includes rewriting/relocation/transformation of certain elements in the content. This step may get lost if you just migrate your content from an old 6.x instance to a new 6.5 environment using a content migration tool, such as crx2oak. Also for upgrades from 6.0, there are breaking changes involved on the persistence level (changes to the format of the JCR repository). So make sure to follow the official upgrade documentation.

 

Apart from the "pure" instance upgrade/migration, please also consider the following tasks that make sense and/or are necessary for an upgrade:

  • Upgrade your JRE to the latest supported version. AEM 6.5 supports Java 8 and 11.
  • Make sure to include the latest Service Pack on the target version (SP 9 for AEM 6.5), SP 10 to be released end of August.
  • Perform some clean-ups and grooming on your repository before migration. Get rid of everything that is no longer needed, execute the common maintenance tasks (workflow and version purge) and run a repository compaction.
  • Upgrade your projects dependencies (primarily the uber-jar).
  • Refactor your code to ensure it's functioning as expected under the new version and with the new dependencies.
  • Consider upgrading any 3rd party libraries, integrations and similar to their respective latest versions as well.
  • Consider some code refactoring work to follow the latest recommendations and best practices, avoid usage of deprecated APIs/features/etc. and make your code base as modern, clean and up-to-date as possible.
  • Consider automating the provisioning and configuration of your AEM environments.

Please also note: the bigger the upgrade version step, the more work it is. So plan to test the actual migration process, ideally on a production clone to ensure that you are comfortable with it and there are no surprises during the actual migration run.

 

Please also refer to these documentations:

 

Hope that helps!