Expand my Community achievements bar.

Migrating Select Content Between AEM Instances in Different Environments

Avatar

Level 2

Hi Folks,

I work on a project where authors upload and author content in a lower environment, and when done, want that content moved to our production environment.

Doing this involves building package(s) of content that the authors want moved. If there are few filters, we build packages manually. If a lot of content needs to be moved, we've developed a tool using JcrPackageManager to help assemble a package from a list of filters. But after this, the package is manually built, downloaded, uploaded and installed to the target instance.

Is there a way to bypass packages and create a servlet tool to move a specific list of assets directly from a source instance to a target instance, given that these instances live in different environments?

10 Replies

Avatar

Level 2

I have not explored this option yet. I will take a look.

Question - can you read a file of paths into this tool? Can paths be validated as they are processed - aka if some path filters are faulty/missing in the repo, then flag/log them and continue with the remaining list of paths?

Avatar

Level 10

The vlt tool cannot do that - like i said - best practice is to package up your content, set the filters with the content in the JCR you want included in the package and then build the package. AEM is built to work this way

Avatar

Level 2

So it sounds like leveraging the Package Manager API is the ideal approach then. Here's a tack on question - can I, through the AEM API, POST and install the package to a target instance after it has been built on the source (as opposed to using curl commands)?

Avatar

Level 10

Packages are still the best way to move content from 1 instance to another. AEM Also exposes a Package Manager API that lets you programmatically create packages --

"The CQ5 Quickstart and Web Application."

See PackageManager API

Avatar

Level 2

Hi smacdonald2008,

We've actually already created a custom tool that uses JcrPackageManager to read in a CSV file with filters and assemble a package. I still need to manually build the package, and then use curl commands to move the package to the target server, upload to the target instance, install on the target instance, and tree-activate the assets. I would like to cut out all that work and just move assets directly to the target instance and replicate them.

Avatar

Level 10

Sure you can. Build a custom servlet that uses AssetManager API. Then perform a Get iperation to invoke the servlet

Avatar

Level 2

Hi Jorg,

As part of an application migration to a new infrastructure, we did try to use Grabbit, but it did not work for us. It probably came down to firewall rules on our systems (everything is kinda messed up on our new infrastructure )

So for the purposes of doing routine content migration, I'm not sure if Grabbit will do the trick for us.

Avatar

Community Advisor

You could post you issues in grabbit github repo.. From what I know that is the fastest of available options and easy to automate. So worth a try to see it your issue can be fixed.