Skip to main content
New Member
Aug 27, 2024 6:26 PM UTC
Solved

AEMaaCS - Content Copy Tool limitiation with published content

We are in the process of moving from onPremise to AEMaaCS and have been investigating using the Content Copy Tool as a way to keep a portion of our content in sync between Prod and Stage environments.  

 

In author environments this looks to work well, but for Stage regression/sign-off we really would like to have the content in sync on the Publish servers as well.  Any suggestions on a good way to automate this?

 

Documentation reference:

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developer-tools/content-copy

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
narendiran_ravi
narendiran_raviAccepted solution
Level 6
Aug 28, 2024 1:32 AM UTC

You can use a content tree workflow to activate the content. To automate this, we can create a batch or Groovy script to call the workflow using the payload used in your content set. The script will make the curl call to the workflow. In the below example batch script, it accepts the input.txt which contains the path added in content sets.

set "inputFile=input.txt" set "outputFile=output.txt" set "curlURL=https://aem-author-url/etc/workflow/instances" set "token=Your Token" for /f "tokens=*" %%a in (!inputFile!) do ( set "payload=%%a" echo Sending payload: !payload! >> !outputFile! curl -H "Authorization: Bearer !token!" -d "model=/var/workflow/models/adobe-publish-content-tree&payloadType=JCR_PATH&payload=!payload!" !curlURL! >> !outputFile! echo Delaying for 15 minutes... timeout /t 900 >nul )

 To call the workflow via curl you need to pass the token which can be generated from the developer console of the respective environments - https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/generating-access-tokens-for-server-side-apis#developer-flow . 

3 replies

MukeshYadav_
Community Advisor
Community Advisor
Aug 27, 2024 8:00 PM UTC

Hi,

Right, content can only be copied from a higher environment to a lower environment or between development/RDE environments where the hierarchy of environments is as follows (from highest to lowest)

 

We may copy from prod to stag and check if everything is in sync in case content is on prod 

There are some approach like package manager, CRX/DE lite & replication but each of these has their own limitation and also it is not recommended to copy from lower org to prod.

Referance https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-update-migrate-content-from-lower-to-higher-enviromnemt/td-p/689996

Thanks

Translate
narendiran_ravi
narendiran_raviAccepted solution
Level 6
Aug 28, 2024 1:32 AM UTC

You can use a content tree workflow to activate the content. To automate this, we can create a batch or Groovy script to call the workflow using the payload used in your content set. The script will make the curl call to the workflow. In the below example batch script, it accepts the input.txt which contains the path added in content sets.

set "inputFile=input.txt" set "outputFile=output.txt" set "curlURL=https://aem-author-url/etc/workflow/instances" set "token=Your Token" for /f "tokens=*" %%a in (!inputFile!) do ( set "payload=%%a" echo Sending payload: !payload! >> !outputFile! curl -H "Authorization: Bearer !token!" -d "model=/var/workflow/models/adobe-publish-content-tree&payloadType=JCR_PATH&payload=!payload!" !curlURL! >> !outputFile! echo Delaying for 15 minutes... timeout /t 900 >nul )

 To call the workflow via curl you need to pass the token which can be generated from the developer console of the respective environments - https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/generating-access-tokens-for-server-side-apis#developer-flow . 

Translate
kautuk_sahni
Level 9
Aug 30, 2024 12:08 PM UTC

@joshel1 Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Translate
Kautuk Sahni