Cloning AEM Instance from One Server to Another Server | Community
Skip to main content
Level 4
March 27, 2019
Solved

Cloning AEM Instance from One Server to Another Server

  • March 27, 2019
  • 13 replies
  • 10547 views

Dear All,

We have AEM instance on one server with heavy DAM. In order to save time, we would like to clone AEM instance from this server (pre prod) to another server (prod) for example.

Could you please provide some inputs on best practices.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrijeshYadav

Yes, it will work without any issue. This is called offline backup in AEM.

The important thing to remember that make sure you change correct run mode before you start AEM at the new location.

Read here more about offline Backup and Restore

Offline Backup

You can always do an offline backup. This requires a downtime of AEM, but can be quite efficient in terms of required time compared to an online backup.

In most cases, you will use a filesystem snapshot to create a read-only copy of the storage at that time. To create a offline backup perform these steps:

  • stop the application
  • make a snapshot backup
  • start the application

13 replies

BrijeshYadav
Level 5
April 2, 2019

Strange, I have never seen that coping repository on running aem can break the existing instance.


Did you try same on existing aem instance?

Try to login via crx/de and then go to http://host:port/system/console and ensure that the status of all bundles is Active, specifically check the status of Apache Sling Authentication Service bundle, it should have an active status.

Another possible reason could be that indexes get corrupted. You can recreate indexes by deleting or renaming /crx-quickstart/repository/version/index folder.

Maddy737Author
Level 4
April 2, 2019

On Existing environment error is different. As i said it throws "Authenticate service missing, cannot authenticate request". Currenly am running the consistency check which is taking long time. (Repo is around 1 TB).

Tried with below command

java -Dtar.memoryMapped=true -Xmx16g -jar oak-run-1.8.9.jar check ./AEM64/crx-quickstart/repository/segmentstore

Maddy737Author
Level 4
April 2, 2019

Consistency check did not show any issue related to repository corruption. However, below is the first error i see before instance show Authentication service missing error. Any one come across this error?

01.04.2019 16:41:25.679 *ERROR* [Apache Sling Repository Startup Thread] com.adobe.granite.repository.impl.SlingRepositoryManager Exception in a SlingRepositoryInitializer, SlingRepository service registration aborted

java.lang.RuntimeException: Failed to set ACL (java.lang.NullPointerException) AclLine ALLOW {paths=[/libs/sling/xss, /libs/cq/xssprotection, /apps/sling/xss, /apps/cq/xssprotection], privileges=[jcr:read]}

at org.apache.sling.jcr.repoinit.impl.AclVisitor.setAcl(AclVisitor.java:63) [org.apache.sling.jcr.repoinit:1.1.8]

at org.apache.sling.jcr.repoinit.impl.AclVisitor.visitSetAclPrincipal(AclVisitor.java:84) [org.apache.sling.jcr.repoinit:1.1.8]

at org.apache.sling.repoinit.parser.operations.SetAclPrincipals.accept(SetAclPrincipals.java:53) [org.apache.sling.repoinit.parser:1.2.2]

at org.apache.sling.jcr.repoinit.impl.JcrRepoInitOpsProcessorImpl.apply(JcrRepoInitOpsProcessorImpl.java:54) [org.apache.sling.jcr.repoinit:1.1.8]

at org.apache.sling.jcr.repoinit.impl.RepositoryInitializer.processRepository(RepositoryInitializer.java:99) [org.apache.sling.jcr.repoinit:1.1.8]

at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.executeRepositoryInitializers(AbstractSlingRepositoryManager.java:541) [org.apache.sling.jcr.base:3.0.4]

at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:485) [org.apache.sling.jcr.base:3.0.4]

at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:85) [org.apache.sling.jcr.base:3.0.4]

at org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:455) [org.apache.sling.jcr.base:3.0.4]

Caused by: java.lang.NullPointerException: null

at org.apache.sling.jcr.repoinit.impl.AclUtil.setAcl(AclUtil.java:125) [org.apache.sling.jcr.repoinit:1.1.8]

at org.apache.sling.jcr.repoinit.impl.AclUtil.setAcl(AclUtil.java:111) [org.apache.sling.jcr.repoinit:1.1.8]

at org.apache.sling.jcr.repoinit.impl.AclVisitor.setAcl(AclVisitor.java:61) [org.apache.sling.jcr.repoinit:1.1.8]

... 8 common frames omitted