Skip to content

Instantly share code, notes, and snippets.

@andrewmkhoury
Last active June 20, 2023 15:29
Show Gist options
  • Select an option

  • Save andrewmkhoury/280c6d0ac1db03b57c58 to your computer and use it in GitHub Desktop.

Select an option

Save andrewmkhoury/280c6d0ac1db03b57c58 to your computer and use it in GitHub Desktop.

Revisions

  1. andrewmkhoury revised this gist Jun 5, 2019. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## AEM6.x Migration
    * _How to Rebuild a Pre-Existing AEM+Mongo Cluster_
    * _or migrate from Tar to MongoDB or MongoDB to Tar"
    * _or migrate from Tar to MongoDB or MongoDB to Tar"_
    * _or migrate from 5.6.1 or 6.x to 6.x via data migration instead of jar upgrade_

    1. **_(Mongo to Mongo only)_ Remove one replica from the replica set and delete/recreate the db**
    @@ -140,5 +140,6 @@
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
    17. **Take a short outage window and do the cut over to the environment** by simply clearing the dispatcher cache and pointing it to the new environment. If no dispatcher is used, then point the load balancer to the new AEM environment instead of the old.
    _Alternative upgrade approach for CQ5.x to AEM6.x upgrade using Oak level crx2oak tool documented here: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    _Alternative upgrade approach for CQ5.x to AEM6.x upgrade using Oak level crx2oak tool documented here:_ http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    WARNING: the crx2oak (aka oak-upgrade) tool will NOT migrate namespaces that are required for the nodes and properties.
  2. andrewmkhoury revised this gist Jun 4, 2019. 1 changed file with 1 addition and 63 deletions.
    64 changes: 1 addition & 63 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -87,69 +87,7 @@
    * Or leverage the Oak migration tool, this might be faster and supports version history migration while VLT does not: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    Note: Alternatively it might be possible to use grabbit: https://github.com/TWCable/grabbit to perform the data migration instead.
    6. **Migrate users and groups** _(If users were not imported automatically via LDAP)_
    Package users and groups (2 separate packages) on the old system (excluding admin and anonymous OOTB users)
    1. Go to CRXDE lite app /crx/de/index.jsp and log in as admin user (on the old system)
    2. Go to "Tools" => "Query"
    3. In the bottom "Query" box enter this query to find the admin user:
    _/jcr:root/home/users//element(*,rep:User)[@rep:principalName="admin"]_
    4. Click "Execute" and copy the path of the admin user node in the results to a text file
    5. Repeat step 3 with a query for anonymous user:
    _/jcr:root/home/users//element(*,rep:User)[@rep:principalName="anonymous"]_
    6. Click "Execute" and copy the path of the anonymous user node in the results to a text file (so now you should have two paths, one for "admin" and one for "anonymous")
    For example:
    * /home/users/Q/QY5FIMXeQIbGpwZtQ3Dv – admin user on the system where I am creating the package
    * /home/users/K/Kj1406Qo9IDODc_nk5Ib – anonymous user on the system where I am creating the package
    7. Go to the "Package Manager", _http://host:port/crx/packmgr/index.jsp_, and log in as admin
    8. Create a package "users"
    9. Add a filter to the package config for /home/users
    with these exclude rules (on the /home/users filter):
    * exclude /home/users/.*/.tokens
    * exclude /home/users/Q/QY5FIMXeQIbGpwZtQ3Dv
    * exclude /home/users/K/Kj1406Qo9IDODc_nk5Ib
    * exclude /home/users/a/admin
    * exclude /home/users/a/anonymous
    * exclude /home/users/system
    * exclude /home/users/geometrixx
    * exclude /home/users/media
    * exclude /home/users/projects
    * exclude /home/users/mac
    10. Build the package
    11. Download the package
    12. Unzip the package zip file on your computer
    13. Open the file META-INF/vault/filter.xml in a text editor
    14. Add mode="merge" to the \<filter ...> tag, for example:
    ```
    <?xml version="1.0" encoding="UTF-8"?>
    <workspaceFilter version="1.0">
    <filter root="/home/users" mode="merge">
    <exclude pattern="/home/users/.*/.tokens"/>
    <exclude pattern="/home/users/Q/QY5FIMXeQIbGpwZtQ3Dv"/>
    <exclude pattern="/home/users/K/Kj1406Qo9IDODc_nk5Ib"/>
    <exclude pattern="/home/users/a/admin"/>
    <exclude pattern="/home/users/a/anonymous"/>
    <exclude pattern="/home/users/system"/>
    <exclude pattern="/home/users/geometrixx"/>
    <exclude pattern="/home/users/media"/>
    <exclude pattern="/home/users/projects"/>
    <exclude pattern="/home/users/mac"/>
    </filter>
    </workspaceFilter>
    ```
    15. Re-zip the modified package contents so it includes the change
    16. Create a "groups" package that contains a filter rule /home/groups
    17. Repeat steps 11-14 for the groups package
    18. (Upgrade only) If performing migration to newer AEM version, then install a fresh local AEM instance _of the old version_(with nosamplecontent), and install the users package, and then the groups package there. Then, perform an in-place upgrade to the new version on that instance. This converts the users to the new Oak representation. After the in-place upgrade, repackage the users again to port them to your intended upgraded instance. Do the same for the user groups.
    19. Install the users package on the new system
    20. Install the groups package on the new system
    7. Migrate ACLs
    1. Download and install ACS Commons to the source system https://adobe-consulting-services.github.io/acs-aem-commons/
    2. Use the ACL packager to package up all custom ACLs https://adobe-consulting-services.github.io/acs-aem-commons/features/packagers/acl-packager/index.html
    3. When packaging the ACLs make sure to edit the package configuration, go to the "Advanced" tab and set "AC Handling" mode to "Merge"
    4. Build the package
    5. Install it on the new system
    * Follow steps here: https://helpx.adobe.com/experience-manager/kb/migrate-users-groups-ACLs.html
    8. **Install the application and other required files**
    1. Install the application including all configurations
    2. Package the replication agents from production, install the package on the new instance and disable the agents
  3. andrewmkhoury revised this gist Oct 12, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -145,7 +145,7 @@
    19. Install the users package on the new system
    20. Install the groups package on the new system
    7. Migrate ACLs
    1. Download and install ACS Commons to the source system
    1. Download and install ACS Commons to the source system https://adobe-consulting-services.github.io/acs-aem-commons/
    2. Use the ACL packager to package up all custom ACLs https://adobe-consulting-services.github.io/acs-aem-commons/features/packagers/acl-packager/index.html
    3. When packaging the ACLs make sure to edit the package configuration, go to the "Advanced" tab and set "AC Handling" mode to "Merge"
    4. Build the package
  4. andrewmkhoury revised this gist Oct 12, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -147,7 +147,9 @@
    7. Migrate ACLs
    1. Download and install ACS Commons to the source system
    2. Use the ACL packager to package up all custom ACLs https://adobe-consulting-services.github.io/acs-aem-commons/features/packagers/acl-packager/index.html
    3. When packaging the ACLs make sure to edit the package configuration, go to the "Advanced" tab and set "AC Handling" mode to "Merge"
    3. When packaging the ACLs make sure to edit the package configuration, go to the "Advanced" tab and set "AC Handling" mode to "Merge"
    4. Build the package
    5. Install it on the new system
    8. **Install the application and other required files**
    1. Install the application including all configurations
    2. Package the replication agents from production, install the package on the new instance and disable the agents
  5. andrewmkhoury revised this gist Oct 12, 2017. 1 changed file with 16 additions and 11 deletions.
    27 changes: 16 additions & 11 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -144,14 +144,18 @@
    18. (Upgrade only) If performing migration to newer AEM version, then install a fresh local AEM instance _of the old version_(with nosamplecontent), and install the users package, and then the groups package there. Then, perform an in-place upgrade to the new version on that instance. This converts the users to the new Oak representation. After the in-place upgrade, repackage the users again to port them to your intended upgraded instance. Do the same for the user groups.
    19. Install the users package on the new system
    20. Install the groups package on the new system
    7. **Install the application and other required files**
    7. Migrate ACLs
    1. Download and install ACS Commons to the source system
    2. Use the ACL packager to package up all custom ACLs https://adobe-consulting-services.github.io/acs-aem-commons/features/packagers/acl-packager/index.html
    3. When packaging the ACLs make sure to edit the package configuration, go to the "Advanced" tab and set "AC Handling" mode to "Merge"
    8. **Install the application and other required files**
    1. Install the application including all configurations
    2. Package the replication agents from production, install the package on the new instance and disable the agents
    3. Package any extra items like /etc/designs and other items
    4. Validate any backend and third party integrations
    8. **Install custom lucene property indexes**, make sure all indexes have been applied and fully indexed
    9. **Do testing (functional and load testing)** to validate that the application works perfectly
    10. **Create package using a search for pages that changed since the copy was done**
    9. **Install custom lucene property indexes**, make sure all indexes have been applied and fully indexed
    10. **Do testing (functional and load testing)** to validate that the application works perfectly
    11. **Create package using a search for pages that changed since the copy was done**
    1. Install either one of these tools for packaging the changed content:
    * http://adobe-consulting-services.github.io/acs-aem-commons/features/query-packager.html
    * http://www.wemblog.com/2011/11/how-to-create-package-based-on-xpath-in.html
    @@ -172,15 +176,15 @@
    ```
    5. Install all the packages to the AEM instance (install the tags first, then the assets then pages)
    6. Account for any other data that might of changed (for example, new users added to the system or other content)
    11. **Remove the disabling of OSGi component** config that we did in step 3 above to re-allow audit trails and tag validation.
    12. **_(Mongo to Mongo only)_ Remove another replica from the original mongo cluster**, wipe out the database there and instead add it to the new replica from step A.
    12. **Remove the disabling of OSGi component** config that we did in step 3 above to re-allow audit trails and tag validation.
    13. **_(Mongo to Mongo only)_ Remove another replica from the original mongo cluster**, wipe out the database there and instead add it to the new replica from step A.
    1. Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member
    2. Validate that no other nodes in the set consider that node to be part of the set anymore
    3. Drop the aem database on that node http://docs.mongodb.org/manual/reference/command/dropDatabase/
    4. Add the node as a replica http://docs.mongodb.org/master/tutorial/expand-replica-set/
    13. **Do testing (functional and load testing)** to validate that the application works perfectly
    14. **Validate that the environment is fully in sync** and, if needed, repeat step D above with a later date / time as needed
    15. **Perform repository maintenance**
    14. **Do testing (functional and load testing)** to validate that the application works perfectly
    15. **Validate that the environment is fully in sync** and, if needed, repeat step D above with a later date / time as needed
    16. **Perform repository maintenance**
    * Mongo (only) - Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    1. Stop all AEM cluster nodes
    @@ -194,6 +198,7 @@
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
    16. **Take a short outage window and do the cut over to the environment** by simply clearing the dispatcher cache and pointing it to the new environment. If no dispatcher is used, then point the load balancer to the new AEM environment instead of the old.
    17. **Take a short outage window and do the cut over to the environment** by simply clearing the dispatcher cache and pointing it to the new environment. If no dispatcher is used, then point the load balancer to the new AEM environment instead of the old.
    _Alternative upgrade approach for CQ5.x to AEM6.x upgrade using Oak level crx2oak tool documented here: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html_
    _Alternative upgrade approach for CQ5.x to AEM6.x upgrade using Oak level crx2oak tool documented here: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    WARNING: the crx2oak (aka oak-upgrade) tool will NOT migrate namespaces that are required for the nodes and properties.
  6. andrewmkhoury revised this gist Jul 17, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@
    com.day.cq.dam.core.impl.event.DamEventAuditListener
    com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.JcrTagManagerFactoryImpl
    com.day.cq.tagging.impl.TagValidatingEventListener
    com.day.cq.dam.core.impl.DamChangeEventListener
    ```
    3. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
  7. andrewmkhoury revised this gist Apr 13, 2017. 1 changed file with 138 additions and 128 deletions.
    266 changes: 138 additions & 128 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -2,120 +2,124 @@
    * _How to Rebuild a Pre-Existing AEM+Mongo Cluster_
    * _or migrate from Tar to MongoDB or MongoDB to Tar"
    * _or migrate from 5.6.1 or 6.x to 6.x via data migration instead of jar upgrade_

    1. _(Mongo to Mongo only)_ Remove one replica from the replica set and delete/recreate the db
    1. Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member/
    2. Validate that no other nodes in the set consider that node to be part of the set anymore. Log into each node in the cluster via mongo shell and run rs.status() to validate that the node that was taken out is not in the cluster any longer.
    3. Drop the aem database on that node http://docs.mongodb.org/manual/reference/command/dropDatabase/
    4. Re-add the database with the correct user permissions (do not add the mongo instance back to the replica set)
    5. Remove one of the AEM cluster nodes from the load balancer or dispatcher config (whichever config is managing the active cluster nodes)
    6. Stop the AEM instance on the inactive node
    5. On the same server install a fresh AEM6.x instance pointed at the new emptied mongo database and install hotfixes (for AEM6.0 install Oak 1.0.27 or later, AEM6.1 install Oak 1.2.11 or later)
    * 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
    * 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
    6. Skip step 2 below
    2. Install a fresh AEM6.x instance and all the recent recommended hotfixes
    1. **_(Mongo to Mongo only)_ Remove one replica from the replica set and delete/recreate the db**
    1. Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member/
    2. Validate that no other nodes in the set consider that node to be part of the set anymore. Log into each node in the cluster via mongo shell and run rs.status() to validate that the node that was taken out is not in the cluster any longer.
    3. Drop the aem database on that node http://docs.mongodb.org/manual/reference/command/dropDatabase/
    4. Re-add the database with the correct user permissions (do not add the mongo instance back to the replica set)
    5. Remove one of the AEM cluster nodes from the load balancer or dispatcher config (whichever config is managing the active cluster nodes)
    6. Stop the AEM instance on the inactive node
    7. On the same server install a fresh AEM6.x instance pointed at the new emptied mongo database and install hotfixes (for AEM6.0 install Oak 1.0.27 or later, AEM6.1 install Oak 1.2.11 or later)
    * 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
    * 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
    8. Skip step 2 below
    2. **Install a fresh AEM6.x instance and all the recent recommended hotfixes**
    * 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
    * 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
    3. Optimize the instance using the configurations here - https://helpx.adobe.com/experience-manager/kb/performance-tuning-tips.html
    4. Prep the systems for data migration
    3. **Optimize the instance using the configurations here** - https://helpx.adobe.com/experience-manager/kb/performance-tuning-tips.html
    4. **Prep the systems for data migration**
    1. Prep source system if migrating from CQ5.x version to AEM6.x:
    1. Run consistency check and fix: https://helpx.adobe.com/experience-manager/kb/RepositoryInconsistency.html
    2. Remove Same Name Sibling nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. Prep the destination 6.x system:
    1. Apply any customizations to the AEM start script and restart AEM
    2. Disable workflow launchers for DAM by going to the launcher tab under workflow console url: http://host:port/libs/cq/workflow/content/console.html
    * Disable all launchers that use "DAM Update Asset" and "DAM Metadata Writeback” workflow models.
    3. Disable OSGi components to reduce overhead.
    * Install ACS Commons (on the newly installed environment): http://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disabler.html
    * Disable these OSGi components using the osgi-disabler:
    * com.day.cq.dam.core.impl.event.DamEventAuditListener
    * com.day.cq.replication.audit.ReplicationEventListener
    * com.day.cq.wcm.core.impl.event.PageEventAuditListener
    * com.day.cq.tagging.impl.JcrTagManagerFactoryImpl
    * com.day.cq.dam.core.impl.DamChangeEventListener
    5. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
    6. Go to CRXDE on the destination instance, browse to /oak:index/lucene and add a String[] property excludedPaths
    1. Apply any customizations to the AEM start script and restart AEM
    2. Disable workflow launchers for DAM by going to the launcher tab under workflow console url: http://host:port/libs/cq/workflow/content/console.html
    * Disable all launchers that use "DAM Update Asset" and "DAM Metadata Writeback” workflow models.
    3. Disable OSGi components to reduce overhead.
    * Install ACS Commons (on the newly installed environment): http://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disabler.html
    * Disable these OSGi components using the osgi-disabler:
    ```
    com.day.cq.dam.core.impl.event.DamEventAuditListener
    com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.JcrTagManagerFactoryImpl
    com.day.cq.dam.core.impl.DamChangeEventListener
    ```
    3. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
    4. Go to CRXDE on the destination instance, browse to /oak:index/lucene and add a String[] property excludedPaths
    ```
    excludedPaths=[/var, /jcr:system, /etc/workflow/instances]
    ```
    5. Perform repository maintenance
    * Mongo (only) Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    1. Stop all AEM cluster nodes
    2. On each node, modify the DocumentNodeStore config file under crx-quickstart/install and set the versionGcMaxAgeInSecs property to 3600 which is 1 hour
    3. Start the leader AEM node
    4. Go to this url _/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily_
    5. Start Revision GC
    6. Monitor the logs until it is done
    7. See here for relevant log messages https://gist.github.com/andrewmkhoury/39b69daf5a097b53937e
    8. Start the other AEM cluster nodes
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
    6. Monitor the logs to validate when Revision GC completes successfully.
    ```
    excludedPaths=[/var, /jcr:system, /etc/workflow/instances]
    grep VersionGarbage error*
    ```
    7. Perform repository maintenance
    * Mongo (only) Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    1. Stop all AEM cluster nodes
    2. On each node, modify the DocumentNodeStore config file under crx-quickstart/install and set the versionGcMaxAgeInSecs property to 3600 which is 1 hour
    3. Start the leader AEM node
    4. Go to this url _/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily_
    5. Start Revision GC
    6. Monitor the logs until it is done
    7. See here for relevant log messages https://gist.github.com/andrewmkhoury/39b69daf5a097b53937e
    8. Start the other AEM cluster nodes
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
    9. Monitor the logs to validate when Revision GC completes successfully.
    * ```grep VersionGarbage error*```
    5. Migrate the data from the old AEM cluster node to the new one
    * if there is not a lot of content in the system then use packages (10GB worth or less). Make sure to set the AC Handling mode on the package to Merge. That way when ACLs are migrated to the new system it won't remove out-of-the-box ACLs.
    * Or use VLT service with instructions below (if you have greater than 5GB worth of content)
    1. If the destination instance is AEM6.1 or later then do the following extra preparation:
    1. Make sure ACS Commons is installed (it should have been installed)
    2. Create a new ACL packager page using the ACS Commons ACL Packager: https://adobe-consulting-services.github.io/acs-aem-commons/features/acl-packager.html
    3. Have it package all ACLs under /content, /etc, and /apps
    4. Go to the package manager and edit the package definition. On the Advanced tab, set AC Handling mode to Merge.
    2. Install the latest vlt-rcp bundle in the destination server
    5. **Migrate the data from the old AEM cluster node to the new one**
    * if there is not a lot of content in the system then use packages (10GB worth or less). Make sure to set the AC Handling mode on the package to Merge. That way when ACLs are migrated to the new system it won't remove out-of-the-box ACLs.
    * Or use VLT service with instructions below (if you have greater than 5GB worth of content)
    1. If the destination instance is AEM6.1 or later then do the following extra preparation:
    1. Make sure ACS Commons is installed (it should have been installed)
    2. Create a new ACL packager page using the ACS Commons ACL Packager: https://adobe-consulting-services.github.io/acs-aem-commons/features/acl-packager.html
    3. Have it package all ACLs under /content, /etc, and /apps
    4. Go to the package manager and edit the package definition. On the Advanced tab, set AC Handling mode to Merge.
    2. Install the latest vlt-rcp bundle in the destination server
    http://repo1.maven.org/maven2/org/apache/jackrabbit/vault/org.apache.jackrabbit.vault.rcp/3.1.24/
    * Instructions for vlt-rcp service here:
    * Instructions for vlt-rcp service here:
    https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-doc/src/site/markdown/rcp.md
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp
    Npte: If you are using CQ5.6.1 then install 5.6.1 Service Pack 2 first as it includes all the dependency bundles required to support vlt rcp. Download SP2 from here: https://helpx.adobe.com/experience-manager/kb/cq561-available-hotfixes.html
    * Some automated scripts to start with:
    * Some automated scripts to start with:
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp/src/test/resources
    * Alternatively, use VLT RCP UI here: http://adobe-consulting-services.github.io/acs-aem-tools/vlt-rcp.html
    3. Use vlt-rcp to copy everything from /etc/tags
    4. Use vlt-rcp to copy everything from /content/dam
    5. Use vlt-rcp to copy each site under /content individually as well
    * Alternatively, use VLT RCP UI here: http://adobe-consulting-services.github.io/acs-aem-tools/vlt-rcp.html
    3. Use vlt-rcp to copy everything from /etc/tags
    4. Use vlt-rcp to copy everything from /content/dam
    5. Use vlt-rcp to copy each site under /content individually as well
    * If possible run concurrent vlt copy tasks to make it faster
    6. Use vlt-rcp to copy any large content under other paths like /etc or /var that is required
    7. Install the ACL package created in the first step
    8. In CRXDe, go to the paths where the ACL package installed the ACLs. Use the "Access Control" tab to re-order the ACLs so any that override your custom ones are at the top of the list.
    * Or leverage the Oak migration tool, this might be faster and supports version history migration while VLT does not: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    6. Use vlt-rcp to copy any large content under other paths like /etc or /var that is required
    7. Install the ACL package created in the first step
    8. In CRXDe, go to the paths where the ACL package installed the ACLs. Use the "Access Control" tab to re-order the ACLs so any that override your custom ones are at the top of the list.
    * Or leverage the Oak migration tool, this might be faster and supports version history migration while VLT does not: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    Note: Alternatively it might be possible to use grabbit: https://github.com/TWCable/grabbit to perform the data migration instead.
    6. Migrate users and groups _(If users were not impored automatically via LDAP)_
    6. **Migrate users and groups** _(If users were not imported automatically via LDAP)_
    Package users and groups (2 separate packages) on the old system (excluding admin and anonymous OOTB users)
    1. Go to CRXDE lite app /crx/de/index.jsp and log in as admin user (on the old system)
    2. Go to "Tools" => "Query"
    3. In the bottom "Query" box enter this query to find the admin user:
    1. Go to CRXDE lite app /crx/de/index.jsp and log in as admin user (on the old system)
    2. Go to "Tools" => "Query"
    3. In the bottom "Query" box enter this query to find the admin user:
    _/jcr:root/home/users//element(*,rep:User)[@rep:principalName="admin"]_
    4. Click "Execute" and copy the path of the admin user node in the results to a text file
    5. Repeat step 3 with a query for anonymous user:
    4. Click "Execute" and copy the path of the admin user node in the results to a text file
    5. Repeat step 3 with a query for anonymous user:
    _/jcr:root/home/users//element(*,rep:User)[@rep:principalName="anonymous"]_
    6. Click "Execute" and copy the path of the anonymous user node in the results to a text file (so now you should have two paths, one for "admin" and one for "anonymous")
    6. Click "Execute" and copy the path of the anonymous user node in the results to a text file (so now you should have two paths, one for "admin" and one for "anonymous")
    For example:
    * /home/users/Q/QY5FIMXeQIbGpwZtQ3Dv – admin user on the system where I am creating the package
    * /home/users/K/Kj1406Qo9IDODc_nk5Ib – anonymous user on the system where I am creating the package
    For example:
    * /home/users/Q/QY5FIMXeQIbGpwZtQ3Dv – admin user on the system where I am creating the package
    * /home/users/K/Kj1406Qo9IDODc_nk5Ib – anonymous user on the system where I am creating the package
    7. Go to the "Package Manager", _http://host:port/crx/packmgr/index.jsp_, and log in as admin
    8. Create a package "users"
    9. Add a filter to the package config for /home/users
    7. Go to the "Package Manager", _http://host:port/crx/packmgr/index.jsp_, and log in as admin
    8. Create a package "users"
    9. Add a filter to the package config for /home/users
    with these exclude rules (on the /home/users filter):
    * exclude /home/users/.*/.tokens
    * exclude /home/users/Q/QY5FIMXeQIbGpwZtQ3Dv
    * exclude /home/users/K/Kj1406Qo9IDODc_nk5Ib
    * exclude /home/users/a/admin
    * exclude /home/users/a/anonymous
    * exclude /home/users/system
    * exclude /home/users/geometrixx
    * exclude /home/users/media
    * exclude /home/users/projects
    * exclude /home/users/mac
    10. Build the package
    11. Download the package
    12. Unzip the package zip file on your computer
    13. Open the file META-INF/vault/filter.xml in a text editor
    14. Add mode="merge" to the \<filter ...> tag, for example:
    * exclude /home/users/.*/.tokens
    * exclude /home/users/Q/QY5FIMXeQIbGpwZtQ3Dv
    * exclude /home/users/K/Kj1406Qo9IDODc_nk5Ib
    * exclude /home/users/a/admin
    * exclude /home/users/a/anonymous
    * exclude /home/users/system
    * exclude /home/users/geometrixx
    * exclude /home/users/media
    * exclude /home/users/projects
    * exclude /home/users/mac
    10. Build the package
    11. Download the package
    12. Unzip the package zip file on your computer
    13. Open the file META-INF/vault/filter.xml in a text editor
    14. Add mode="merge" to the \<filter ...> tag, for example:
    ```
    <?xml version="1.0" encoding="UTF-8"?>
    @@ -134,43 +138,49 @@
    </filter>
    </workspaceFilter>
    ```
    15. Re-zip the modified package contents so it includes the change
    16. Create a "groups" package that contains a filter rule /home/groups
    17. Repeat steps 11-14 for the groups package
    17. (Upgrade only) If performing migration to newer AEM version then install a fresh local AEM instance (with nosamplecontent) and install the users package then the groups package there. Then perform an in-place upgrade on that instance. After upgrading then repackage the users again then the groups again.
    18. Install the users package on the new system
    19. Install the groups package on the new system
    7. Install the application and other required files
    1. Install the application including all configurations
    2. Package the replication agents from production, install the package on the new instance and disable the agents
    3. Package any extra items like /etc/designs and other items
    4. Validate any backend and third party integrations
    8. Install custom lucene property indexes, make sure all indexes have been applied and fully indexed
    9. Do testing (functional and load testing) to validate that the application works perfectly
    10. Create package using a search for pages that changed since the copy was done
    1. Install either one of these tools for packaging the changed content:
    * http://adobe-consulting-services.github.io/acs-aem-commons/features/query-packager.html
    * http://www.wemblog.com/2011/11/how-to-create-package-based-on-xpath-in.html
    2. Create package using a search for tags that changed since the copy was done.
    15. Re-zip the modified package contents so it includes the change
    16. Create a "groups" package that contains a filter rule /home/groups
    17. Repeat steps 11-14 for the groups package
    18. (Upgrade only) If performing migration to newer AEM version, then install a fresh local AEM instance _of the old version_(with nosamplecontent), and install the users package, and then the groups package there. Then, perform an in-place upgrade to the new version on that instance. This converts the users to the new Oak representation. After the in-place upgrade, repackage the users again to port them to your intended upgraded instance. Do the same for the user groups.
    19. Install the users package on the new system
    20. Install the groups package on the new system
    7. **Install the application and other required files**
    1. Install the application including all configurations
    2. Package the replication agents from production, install the package on the new instance and disable the agents
    3. Package any extra items like /etc/designs and other items
    4. Validate any backend and third party integrations
    8. **Install custom lucene property indexes**, make sure all indexes have been applied and fully indexed
    9. **Do testing (functional and load testing)** to validate that the application works perfectly
    10. **Create package using a search for pages that changed since the copy was done**
    1. Install either one of these tools for packaging the changed content:
    * http://adobe-consulting-services.github.io/acs-aem-commons/features/query-packager.html
    * http://www.wemblog.com/2011/11/how-to-create-package-based-on-xpath-in.html
    2. Create package using a search for tags that changed since the copy was done.
    Use this query for tags (but change the date):
    ``//element(*, cq:Tag)[@jcr:created > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    3. Create package using a search for assets that changed since the copy was done.
    ```
    //element(*, cq:Tag)[@jcr:created > xs:dateTime('2015-09-16T00:00:00.000-05:00')]
    ```
    3. Create package using a search for assets that changed since the copy was done.
    Use this query for assets (but change the date):
    ``//element(*, dam:AssetContent)[@jcr:lastModified > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    4. Create package using a search for pages that changed since the copy was done.
    ```
    //element(*, dam:AssetContent)[@jcr:lastModified > xs:dateTime('2015-09-16T00:00:00.000-05:00')]
    ```
    4. Create package using a search for pages that changed since the copy was done.
    Use this query for pages (but change the date):
    ``//element(*,cq:PageContent)[@cq:lastModified >= xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    5. Install all the packages to the AEM instance (install the tags first, then the assets then pages)
    6. Account for any other data that might of changed (for example, new users added to the system or other content)
    11. Remove the disabling of OSGi component config that we did in step 3 above to re-allow audit trails and tag validation.
    12. _(Mongo to Mongo only)_ Remove another replica from the original mongo cluster, wipe out the database there and instead add it to the new replica from step A.
    1. Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member
    2. Validate that no other nodes in the set consider that node to be part of the set anymore
    3. Drop the aem database on that node http://docs.mongodb.org/manual/reference/command/dropDatabase/
    4. Add the node as a replica http://docs.mongodb.org/master/tutorial/expand-replica-set/
    13. Do testing (functional and load testing) to validate that the application works perfectly
    14. Validate that the environment is fully in sync and, if needed, repeat step D above with a later date / time as needed
    15. Perform repository maintenance
    ```
    //element(*,cq:PageContent)[@cq:lastModified >= xs:dateTime('2015-09-16T00:00:00.000-05:00')]
    ```
    5. Install all the packages to the AEM instance (install the tags first, then the assets then pages)
    6. Account for any other data that might of changed (for example, new users added to the system or other content)
    11. **Remove the disabling of OSGi component** config that we did in step 3 above to re-allow audit trails and tag validation.
    12. **_(Mongo to Mongo only)_ Remove another replica from the original mongo cluster**, wipe out the database there and instead add it to the new replica from step A.
    1. Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member
    2. Validate that no other nodes in the set consider that node to be part of the set anymore
    3. Drop the aem database on that node http://docs.mongodb.org/manual/reference/command/dropDatabase/
    4. Add the node as a replica http://docs.mongodb.org/master/tutorial/expand-replica-set/
    13. **Do testing (functional and load testing)** to validate that the application works perfectly
    14. **Validate that the environment is fully in sync** and, if needed, repeat step D above with a later date / time as needed
    15. **Perform repository maintenance**
    * Mongo (only) - Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    1. Stop all AEM cluster nodes
    @@ -184,6 +194,6 @@
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
    16. Take a short outage window and do the cut over to the environment by simply clearing the dispatcher cache and pointing it to the new environment. If no dispatcher is used, then point the load balancer to the new AEM environment instead of the old.
    16. **Take a short outage window and do the cut over to the environment** by simply clearing the dispatcher cache and pointing it to the new environment. If no dispatcher is used, then point the load balancer to the new AEM environment instead of the old.
    _Alternative upgrade approach for CQ5.x to AEM6.x upgrade using Oak level crx2oak tool documented here: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html_
    _Alternative upgrade approach for CQ5.x to AEM6.x upgrade using Oak level crx2oak tool documented here: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html_
  8. andrewmkhoury revised this gist Apr 13, 2017. 1 changed file with 5 additions and 7 deletions.
    12 changes: 5 additions & 7 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -29,13 +29,11 @@
    3. Disable OSGi components to reduce overhead.
    * Install ACS Commons (on the newly installed environment): http://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disabler.html
    * Disable these OSGi components using the osgi-disabler:
    ```
    com.day.cq.dam.core.impl.event.DamEventAuditListener
    com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.TagValidatingEventListener
    com.day.cq.dam.core.impl.DamChangeEventListener
    ```
    * com.day.cq.dam.core.impl.event.DamEventAuditListener
    * com.day.cq.replication.audit.ReplicationEventListener
    * com.day.cq.wcm.core.impl.event.PageEventAuditListener
    * com.day.cq.tagging.impl.JcrTagManagerFactoryImpl
    * com.day.cq.dam.core.impl.DamChangeEventListener
    5. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
    6. Go to CRXDE on the destination instance, browse to /oak:index/lucene and add a String[] property excludedPaths
    ```
  9. andrewmkhoury revised this gist Apr 13, 2017. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -30,12 +30,11 @@
    * Install ACS Commons (on the newly installed environment): http://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disabler.html
    * Disable these OSGi components using the osgi-disabler:
    ```
    com.day.cq.dam.core.impl.event.DamEventAuditListener
    com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.TagValidatingEventListener
    com.day.cq.dam.core.impl.DamChangeEventListener
    com.day.cq.dam.core.impl.event.DamEventAuditListener
    com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.TagValidatingEventListener
    com.day.cq.dam.core.impl.DamChangeEventListener
    ```
    5. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
    6. Go to CRXDE on the destination instance, browse to /oak:index/lucene and add a String[] property excludedPaths
  10. andrewmkhoury revised this gist Apr 13, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,8 @@ com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.TagValidatingEventListener
    com.day.cq.dam.core.impl.DamChangeEventListener
    ```
    ```
    5. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
    6. Go to CRXDE on the destination instance, browse to /oak:index/lucene and add a String[] property excludedPaths
    ```
  11. andrewmkhoury revised this gist Apr 13, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.TagValidatingEventListener
    com.day.cq.dam.core.impl.DamChangeEventListener
    ```
    ```
    5. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
    6. Go to CRXDE on the destination instance, browse to /oak:index/lucene and add a String[] property excludedPaths
    ```
  12. andrewmkhoury revised this gist Feb 1, 2017. 1 changed file with 13 additions and 7 deletions.
    20 changes: 13 additions & 7 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -58,9 +58,14 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    9. Monitor the logs to validate when Revision GC completes successfully.
    * ```grep VersionGarbage error*```
    5. Migrate the data from the old AEM cluster node to the new one
    * if there is not a lot of content in the system then use packages (10GB worth or less)
    * if there is not a lot of content in the system then use packages (10GB worth or less). Make sure to set the AC Handling mode on the package to Merge. That way when ACLs are migrated to the new system it won't remove out-of-the-box ACLs.
    * Or use VLT service with instructions below (if you have greater than 5GB worth of content)
    1. Install the latest vlt-rcp bundle in the destination server
    1. If the destination instance is AEM6.1 or later then do the following extra preparation:
    1. Make sure ACS Commons is installed (it should have been installed)
    2. Create a new ACL packager page using the ACS Commons ACL Packager: https://adobe-consulting-services.github.io/acs-aem-commons/features/acl-packager.html
    3. Have it package all ACLs under /content, /etc, and /apps
    4. Go to the package manager and edit the package definition. On the Advanced tab, set AC Handling mode to Merge.
    2. Install the latest vlt-rcp bundle in the destination server
    http://repo1.maven.org/maven2/org/apache/jackrabbit/vault/org.apache.jackrabbit.vault.rcp/3.1.24/
    * Instructions for vlt-rcp service here:
    https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-doc/src/site/markdown/rcp.md
    @@ -70,13 +75,14 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    * Some automated scripts to start with:
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp/src/test/resources
    * Alternatively, use VLT RCP UI here: http://adobe-consulting-services.github.io/acs-aem-tools/vlt-rcp.html
    2. Use vlt-rcp to copy everything from /etc/tags
    3. Use vlt-rcp to copy everything from /content/dam
    4. Use vlt-rcp to copy each site under /content individually as well
    3. Use vlt-rcp to copy everything from /etc/tags
    4. Use vlt-rcp to copy everything from /content/dam
    5. Use vlt-rcp to copy each site under /content individually as well
    * If possible run concurrent vlt copy tasks to make it faster
    5. Use vlt-rcp to copy any large content under other paths like /etc or /var that is required
    6. Use vlt-rcp to copy any large content under other paths like /etc or /var that is required
    7. Install the ACL package created in the first step
    8. In CRXDe, go to the paths where the ACL package installed the ACLs. Use the "Access Control" tab to re-order the ACLs so any that override your custom ones are at the top of the list.
    * Or leverage the Oak migration tool, this might be faster and supports version history migration while VLT does not: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    Note: Alternatively it might be possible to use grabbit: https://github.com/TWCable/grabbit to perform the data migration instead.
    6. Migrate users and groups _(If users were not impored automatically via LDAP)_
    Package users and groups (2 separate packages) on the old system (excluding admin and anonymous OOTB users)
  13. andrewmkhoury revised this gist Jan 12, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -66,7 +66,7 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-doc/src/site/markdown/rcp.md
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp
    Npte: If you are using CQ5.6.1 then install [5.6.1 Service Pack 2|https://helpx.adobe.com/experience-manager/kb/cq561-available-hotfixes.html] first as it includes all the dependency bundles required to support vlt rcp.
    Npte: If you are using CQ5.6.1 then install 5.6.1 Service Pack 2 first as it includes all the dependency bundles required to support vlt rcp. Download SP2 from here: https://helpx.adobe.com/experience-manager/kb/cq561-available-hotfixes.html
    * Some automated scripts to start with:
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp/src/test/resources
    * Alternatively, use VLT RCP UI here: http://adobe-consulting-services.github.io/acs-aem-tools/vlt-rcp.html
  14. andrewmkhoury revised this gist Jan 12, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -66,6 +66,7 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-doc/src/site/markdown/rcp.md
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp
    Npte: If you are using CQ5.6.1 then install [5.6.1 Service Pack 2|https://helpx.adobe.com/experience-manager/kb/cq561-available-hotfixes.html] first as it includes all the dependency bundles required to support vlt rcp.
    * Some automated scripts to start with:
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp/src/test/resources
    * Alternatively, use VLT RCP UI here: http://adobe-consulting-services.github.io/acs-aem-tools/vlt-rcp.html
  15. andrewmkhoury revised this gist Sep 12, 2016. 1 changed file with 14 additions and 13 deletions.
    27 changes: 14 additions & 13 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -60,19 +60,20 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    5. Migrate the data from the old AEM cluster node to the new one
    * if there is not a lot of content in the system then use packages (10GB worth or less)
    * Or use VLT service with instructions below (if you have greater than 5GB worth of content)
    1. Install the latest vlt-rcp bundle in the destination server
    http://repo1.maven.org/maven2/org/apache/jackrabbit/vault/org.apache.jackrabbit.vault.rcp/3.1.24/
    * Instructions for vlt-rcp service here:
    https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-doc/src/site/markdown/rcp.md
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp
    * Some automated scripts to start with:
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp/src/test/resources
    * Alternatively, use VLT RCP UI here: http://adobe-consulting-services.github.io/acs-aem-tools/vlt-rcp.html
    2. Use vlt-rcp to copy everything from /etc/tags
    3. Use vlt-rcp to copy everything from /content/dam
    4. Use vlt-rcp to copy each site under /content individually as well
    * If possible run concurrent vlt copy tasks to make it faster
    5. Use vlt-rcp to copy any large content under other paths like /etc or /var that is required
    1. Install the latest vlt-rcp bundle in the destination server
    http://repo1.maven.org/maven2/org/apache/jackrabbit/vault/org.apache.jackrabbit.vault.rcp/3.1.24/
    * Instructions for vlt-rcp service here:
    https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-doc/src/site/markdown/rcp.md
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp
    * Some automated scripts to start with:
    https://github.com/apache/jackrabbit-filevault/tree/trunk/vault-rcp/src/test/resources
    * Alternatively, use VLT RCP UI here: http://adobe-consulting-services.github.io/acs-aem-tools/vlt-rcp.html
    2. Use vlt-rcp to copy everything from /etc/tags
    3. Use vlt-rcp to copy everything from /content/dam
    4. Use vlt-rcp to copy each site under /content individually as well
    * If possible run concurrent vlt copy tasks to make it faster
    5. Use vlt-rcp to copy any large content under other paths like /etc or /var that is required
    * Or leverage the Oak migration tool, this might be faster and supports version history migration while VLT does not: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    Note: Alternatively it might be possible to use grabbit: https://github.com/TWCable/grabbit to perform the data migration instead.
  16. andrewmkhoury revised this gist Sep 12, 2016. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@
    4. Prep the systems for data migration
    1. Prep source system if migrating from CQ5.x version to AEM6.x:
    1. Run consistency check and fix: https://helpx.adobe.com/experience-manager/kb/RepositoryInconsistency.html
    2. (if migrating from CQ5.x) Remove Same Name Sibling nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. Remove Same Name Sibling nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. Prep the destination 6.x system:
    1. Apply any customizations to the AEM start script and restart AEM
    2. Disable workflow launchers for DAM by going to the launcher tab under workflow console url: http://host:port/libs/cq/workflow/content/console.html
    @@ -42,7 +42,7 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    excludedPaths=[/var, /jcr:system, /etc/workflow/instances]
    ```
    7. Perform repository maintenance
    * Mongo (only) - Run the "Revision Clean Up" task -
    * Mongo (only) Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    1. Stop all AEM cluster nodes
    2. On each node, modify the DocumentNodeStore config file under crx-quickstart/install and set the versionGcMaxAgeInSecs property to 3600 which is 1 hour
    @@ -58,8 +58,8 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    9. Monitor the logs to validate when Revision GC completes successfully.
    * ```grep VersionGarbage error*```
    5. Migrate the data from the old AEM cluster node to the new one
    * if there is not a lot of content in the system then use packages (5GB worth or less each package should be less than 1.5GB)
    * use VLT service with instructions below (if you have greater than 5GB worth of content)
    * if there is not a lot of content in the system then use packages (10GB worth or less)
    * Or use VLT service with instructions below (if you have greater than 5GB worth of content)
    1. Install the latest vlt-rcp bundle in the destination server
    http://repo1.maven.org/maven2/org/apache/jackrabbit/vault/org.apache.jackrabbit.vault.rcp/3.1.24/
    * Instructions for vlt-rcp service here:
    @@ -73,6 +73,7 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    4. Use vlt-rcp to copy each site under /content individually as well
    * If possible run concurrent vlt copy tasks to make it faster
    5. Use vlt-rcp to copy any large content under other paths like /etc or /var that is required
    * Or leverage the Oak migration tool, this might be faster and supports version history migration while VLT does not: http://dev.day.com/content/ddc/en/gems/deep-dive-into-aem-upgrade-process.html
    Note: Alternatively it might be possible to use grabbit: https://github.com/TWCable/grabbit to perform the data migration instead.
    6. Migrate users and groups _(If users were not impored automatically via LDAP)_
  17. andrewmkhoury revised this gist Sep 12, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@
    4. Prep the systems for data migration
    1. Prep source system if migrating from CQ5.x version to AEM6.x:
    1. Run consistency check and fix: https://helpx.adobe.com/experience-manager/kb/RepositoryInconsistency.html
    2. Remove Same Name Sibling nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. (if migrating from CQ5.x) Remove Same Name Sibling nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. Prep the destination 6.x system:
    1. Apply any customizations to the AEM start script and restart AEM
    2. Disable workflow launchers for DAM by going to the launcher tab under workflow console url: http://host:port/libs/cq/workflow/content/console.html
  18. andrewmkhoury revised this gist Sep 12, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@
    4. Prep the systems for data migration
    1. Prep source system if migrating from CQ5.x version to AEM6.x:
    1. Run consistency check and fix: https://helpx.adobe.com/experience-manager/kb/RepositoryInconsistency.html
    2. Remove SNS nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. Remove Same Name Sibling nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. Prep the destination 6.x system:
    1. Apply any customizations to the AEM start script and restart AEM
    2. Disable workflow launchers for DAM by going to the launcher tab under workflow console url: http://host:port/libs/cq/workflow/content/console.html
  19. andrewmkhoury revised this gist Sep 12, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## AEM6.x Migration
    * _How to Rebuild a Pre-Existing AEM+Mongo Cluster_
    * _or migrate from Tar to MongoDB_
    * _or migrate from Tar to MongoDB or MongoDB to Tar"
    * _or migrate from 5.6.1 or 6.x to 6.x via data migration instead of jar upgrade_

    1. _(Mongo to Mongo only)_ Remove one replica from the replica set and delete/recreate the db
  20. andrewmkhoury revised this gist Sep 12, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ## AEM6.x Migration
    * _How to Rebuild a Pre-Existing AEM+Mongo Cluster_
    * _or migrate from Tar to MongoDB_
    * _or migrate from 5.6.1, 6.x to 6.x via data migration instead of jar upgrade_
    * _or migrate from 5.6.1 or 6.x to 6.x via data migration instead of jar upgrade_

    1. _(Mongo to Mongo only)_ Remove one replica from the replica set and delete/recreate the db
    1. Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member/
  21. andrewmkhoury revised this gist Sep 12, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ## AEM6.x Migration
    * _How to Rebuild a Pre-Existing AEM+Mongo Cluster_
    * _or migrate from Tar to MongoDB_
    * _or migrate from 5.6.1, 6.0, or 6.1 to 6.0 or 6.1 (later this year 6.2) via data migration instead of jar upgrade_
    * _or migrate from 5.6.1, 6.x to 6.x via data migration instead of jar upgrade_

    1. _(Mongo to Mongo only)_ Remove one replica from the replica set and delete/recreate the db
    1. Remove the replica node from the set: http://docs.mongodb.org/master/tutorial/remove-replica-set-member/
  22. andrewmkhoury revised this gist Aug 15, 2016. 1 changed file with 15 additions and 9 deletions.
    24 changes: 15 additions & 9 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -18,14 +18,18 @@
    * 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
    * 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
    3. Optimize the instance using the configurations here - https://helpx.adobe.com/experience-manager/kb/performance-tuning-tips.html
    4. Prep the system for data migration
    1. Apply any customizations to the AEM start script and restart AEM
    2. Disable workflow launchers for DAM by going to the launcher tab under workflow console url: http://host:port/libs/cq/workflow/content/console.html
    * Disable all launchers that use "DAM Update Asset" and "DAM Metadata Writeback” workflow models.
    3. Disable OSGi components to reduce overhead.
    * Install ACS Commons (on the newly installed environment): http://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disabler.html
    * Disable these OSGi components using the osgi-disabler:
    ```
    4. Prep the systems for data migration
    1. Prep source system if migrating from CQ5.x version to AEM6.x:
    1. Run consistency check and fix: https://helpx.adobe.com/experience-manager/kb/RepositoryInconsistency.html
    2. Remove SNS nodes: https://helpx.adobe.com/experience-manager/kb/find-sns-nodes.html
    2. Prep the destination 6.x system:
    1. Apply any customizations to the AEM start script and restart AEM
    2. Disable workflow launchers for DAM by going to the launcher tab under workflow console url: http://host:port/libs/cq/workflow/content/console.html
    * Disable all launchers that use "DAM Update Asset" and "DAM Metadata Writeback” workflow models.
    3. Disable OSGi components to reduce overhead.
    * Install ACS Commons (on the newly installed environment): http://adobe-consulting-services.github.io/acs-aem-commons/features/osgi-disabler.html
    * Disable these OSGi components using the osgi-disabler:
    ```
    com.day.cq.dam.core.impl.event.DamEventAuditListener
    com.day.cq.replication.audit.ReplicationEventListener
    com.day.cq.wcm.core.impl.event.PageEventAuditListener
    @@ -137,7 +141,9 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    8. Install custom lucene property indexes, make sure all indexes have been applied and fully indexed
    9. Do testing (functional and load testing) to validate that the application works perfectly
    10. Create package using a search for pages that changed since the copy was done
    1. Install this tool for packaging the changed content: http://adobe-consulting-services.github.io/acs-aem-commons/features/query-packager.html
    1. Install either one of these tools for packaging the changed content:
    * http://adobe-consulting-services.github.io/acs-aem-commons/features/query-packager.html
    * http://www.wemblog.com/2011/11/how-to-create-package-based-on-xpath-in.html
    2. Create package using a search for tags that changed since the copy was done.
    Use this query for tags (but change the date):
    ``//element(*, cq:Tag)[@jcr:created > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
  23. andrewmkhoury revised this gist Aug 15, 2016. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -141,12 +141,12 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    2. Create package using a search for tags that changed since the copy was done.
    Use this query for tags (but change the date):
    ``//element(*, cq:Tag)[@jcr:created > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    3. Create package using a search for pages that changed since the copy was done.
    Use this query for pages (but change the date):
    ``//element(*,cq:PageContent)[@cq:lastModified >= xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    4. Create package using a search for assets that changed since the copy was done.
    3. Create package using a search for assets that changed since the copy was done.
    Use this query for assets (but change the date):
    ``//element(*, dam:AssetContent)[@jcr:lastModified > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    4. Create package using a search for pages that changed since the copy was done.
    Use this query for pages (but change the date):
    ``//element(*,cq:PageContent)[@cq:lastModified >= xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    5. Install all the packages to the AEM instance (install the tags first, then the assets then pages)
    6. Account for any other data that might of changed (for example, new users added to the system or other content)
    11. Remove the disabling of OSGi component config that we did in step 3 above to re-allow audit trails and tag validation.
  24. andrewmkhoury revised this gist Aug 15, 2016. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -138,15 +138,15 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    9. Do testing (functional and load testing) to validate that the application works perfectly
    10. Create package using a search for pages that changed since the copy was done
    1. Install this tool for packaging the changed content: http://adobe-consulting-services.github.io/acs-aem-commons/features/query-packager.html
    2. Create package using a search for pages that changed since the copy was done.
    2. Create package using a search for tags that changed since the copy was done.
    Use this query for tags (but change the date):
    ``//element(*, cq:Tag)[@jcr:created > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    3. Create package using a search for pages that changed since the copy was done.
    Use this query for pages (but change the date):
    ``//element(*,cq:PageContent)[@cq:lastModified >= xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    3. Create package using a search for assets that changed since the copy was done.
    4. Create package using a search for assets that changed since the copy was done.
    Use this query for assets (but change the date):
    ``//element(*, dam:AssetContent)[@jcr:lastModified > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    4. Create package using a search for tags that changed since the copy was done.
    Use this query for tags (but change the date):
    ``//element(*, cq:Tag)[@jcr:created > xs:dateTime('2015-09-16T00:00:00.000-05:00')]``
    5. Install all the packages to the AEM instance (install the tags first, then the assets then pages)
    6. Account for any other data that might of changed (for example, new users added to the system or other content)
    11. Remove the disabling of OSGi component config that we did in step 3 above to re-allow audit trails and tag validation.
  25. andrewmkhoury revised this gist Jul 28, 2016. 1 changed file with 20 additions and 4 deletions.
    24 changes: 20 additions & 4 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -32,10 +32,26 @@ com.day.cq.wcm.core.impl.event.PageEventAuditListener
    com.day.cq.tagging.impl.TagValidatingEventListener
    com.day.cq.dam.core.impl.DamChangeEventListener
    ```
    5. On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled and add excludedPaths=[/var, /jcr:system, /etc/workflow/instances] config to the /oak:index/lucene index.
    6. Allow the system to reindex, this should be fast. Validate that indexing completed in the logs.
    7. Go to http://host:port/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily" and click start on the Revision GC task.
    8. Monitor the logs to validate when Revision GC completes successfully.
    5. (6.x to 6.x migration only) On the old/source instance, package out-of-the-box indexes that were disabled or modified and install those. Do not install custom indexes as it is faster to install them after. The objective here is to get any disabled indexes disabled.
    6. Go to CRXDE on the destination instance, browse to /oak:index/lucene and add a String[] property excludedPaths
    ```
    excludedPaths=[/var, /jcr:system, /etc/workflow/instances]
    ```
    7. Perform repository maintenance
    * Mongo (only) - Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    1. Stop all AEM cluster nodes
    2. On each node, modify the DocumentNodeStore config file under crx-quickstart/install and set the versionGcMaxAgeInSecs property to 3600 which is 1 hour
    3. Start the leader AEM node
    4. Go to this url _/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily_
    5. Start Revision GC
    6. Monitor the logs until it is done
    7. See here for relevant log messages https://gist.github.com/andrewmkhoury/39b69daf5a097b53937e
    8. Start the other AEM cluster nodes
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
    9. Monitor the logs to validate when Revision GC completes successfully.
    * ```grep VersionGarbage error*```
    5. Migrate the data from the old AEM cluster node to the new one
    * if there is not a lot of content in the system then use packages (5GB worth or less each package should be less than 1.5GB)
  26. andrewmkhoury revised this gist Jul 20, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -151,6 +151,7 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    5. Start Revision GC
    6. Monitor the logs until it is done
    7. See here for relevant log messages https://gist.github.com/andrewmkhoury/39b69daf5a097b53937e
    8. Start the other AEM cluster nodes
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
  27. andrewmkhoury revised this gist Jul 20, 2016. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -144,13 +144,13 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    15. Perform repository maintenance
    * Mongo (only) - Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    a. Stop all AEM cluster nodes
    b. On each node, modify the DocumentNodeStore config file under crx-quickstart/install and set the versionGcMaxAgeInSecs property to 3600 which is 1 hour
    c. Start the leader AEM node
    d. Go to this url _/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily_
    e. Start Revision GC
    f. Monitor the logs until it is done
    g. See here for relevant log messages https://gist.github.com/andrewmkhoury/39b69daf5a097b53937e
    1. Stop all AEM cluster nodes
    2. On each node, modify the DocumentNodeStore config file under crx-quickstart/install and set the versionGcMaxAgeInSecs property to 3600 which is 1 hour
    3. Start the leader AEM node
    4. Go to this url _/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily_
    5. Start Revision GC
    6. Monitor the logs until it is done
    7. See here for relevant log messages https://gist.github.com/andrewmkhoury/39b69daf5a097b53937e
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
  28. andrewmkhoury revised this gist Jul 20, 2016. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -142,7 +142,15 @@ com.day.cq.dam.core.impl.DamChangeEventListener
    13. Do testing (functional and load testing) to validate that the application works perfectly
    14. Validate that the environment is fully in sync and, if needed, repeat step D above with a later date / time as needed
    15. Perform repository maintenance
    * Mongo (only) - Run the "Revision Clean Up" task - _/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily_
    * Mongo (only) - Run the "Revision Clean Up" task -
    Since revision GC will only clean up revision that are older than 24 hours by default then to make it clean up more recent revisions do the following:
    a. Stop all AEM cluster nodes
    b. On each node, modify the DocumentNodeStore config file under crx-quickstart/install and set the versionGcMaxAgeInSecs property to 3600 which is 1 hour
    c. Start the leader AEM node
    d. Go to this url _/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily_
    e. Start Revision GC
    f. Monitor the logs until it is done
    g. See here for relevant log messages https://gist.github.com/andrewmkhoury/39b69daf5a097b53937e
    * Tar (only) - Backup the segmentstore and run offline compaction
    * 6.0 - https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#par_title_8
    * 6.1 - https://docs.adobe.com/docs/en/aem/6-1/deploy/platform/storage-elements-in-aem-6.html#par_title_8
  29. andrewmkhoury revised this gist Apr 5, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@
    * 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
    * 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
    6. Skip step 2 below
    2. Install a fresh AEM6.x instance
    2. Install a fresh AEM6.x instance and all the recent recommended hotfixes
    * 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
    * 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
    3. Optimize the instance using the configurations here - https://helpx.adobe.com/experience-manager/kb/performance-tuning-tips.html
  30. andrewmkhoury revised this gist Apr 5, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion AEM6.x Migration Instructions.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,9 @@
    2. Validate that no other nodes in the set consider that node to be part of the set anymore. Log into each node in the cluster via mongo shell and run rs.status() to validate that the node that was taken out is not in the cluster any longer.
    3. Drop the aem database on that node http://docs.mongodb.org/manual/reference/command/dropDatabase/
    4. Re-add the database with the correct user permissions (do not add the mongo instance back to the replica set)
    5. Install a fresh AEM6.x instance on one of the AEM cluster node servers pointed at the new emptied mongo database and install hotfixes (for AEM6.0 install Oak 1.0.27 or later, AEM6.1 install Oak 1.2.11 or later)
    5. Remove one of the AEM cluster nodes from the load balancer or dispatcher config (whichever config is managing the active cluster nodes)
    6. Stop the AEM instance on the inactive node
    5. On the same server install a fresh AEM6.x instance pointed at the new emptied mongo database and install hotfixes (for AEM6.0 install Oak 1.0.27 or later, AEM6.1 install Oak 1.2.11 or later)
    * 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
    * 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
    6. Skip step 2 below