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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Adding / replacing instances

Avatar

Level 5

Hello,

when adding or replacing an existing AEM author / publish instance, what would be the best way to update them with all project related code and content? Is there an automated way to do this (osgi config?) or is it only possible via manual replication or packaging of code / content? By "code" I mean both component related scripts and osgi bundles.

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi Jake,

Like Ankur said, the easy way to add instances is to copy/paste the whole directory and adjust things as necessary. Keep in mind that adding instances this way would not keep things up to date when one instance updates something, unless you've got something to share the repository (Mongo, shared Datastore, etc). If you're cloning Publish instances it helps to create a new replication agent for the new instance before making the copy, so anything activated while you're setting things up will queue up beforehand. 

For migrating code and content to another fresh instance, I've found that content packages are a good way to accomplish this. The only caveat is that it doesn't include page versions. I'm currently looking into using the crx2oak tool to migrate content, as that should bring versions as well. You should include osgi configs in your code package or an /install folder on the local filesystem, rather than creating them manually through the osgi console. That way they're easier to manage and migrate. 

View solution in original post

3 Replies

Avatar

Level 7

Hi Jake,

One way is to copy and paste author/publish repository on new server and then change the required configuration like sling id, replication agent url.

Another approach:- Is to start a vanilla instance of aem, create package of content from existing instance and install on new server. For code migration(scrips/osgi budles) prefer jenking or any other tool to trigger  the build.

Community Member:- Please correct me if i am wrong or missed something.

regards,

Ankur Ahlawat

AEM CQ5 Tutorials

Avatar

Correct answer by
Level 3

Hi Jake,

Like Ankur said, the easy way to add instances is to copy/paste the whole directory and adjust things as necessary. Keep in mind that adding instances this way would not keep things up to date when one instance updates something, unless you've got something to share the repository (Mongo, shared Datastore, etc). If you're cloning Publish instances it helps to create a new replication agent for the new instance before making the copy, so anything activated while you're setting things up will queue up beforehand. 

For migrating code and content to another fresh instance, I've found that content packages are a good way to accomplish this. The only caveat is that it doesn't include page versions. I'm currently looking into using the crx2oak tool to migrate content, as that should bring versions as well. You should include osgi configs in your code package or an /install folder on the local filesystem, rather than creating them manually through the osgi console. That way they're easier to manage and migrate. 

Avatar

Administrator

Thanks you Ankur and Andrew for Excellent answer. 

~kautuk