Expand my Community achievements bar.

SOLVED

AEMaaCS - Content Copy Tool limitiation with published content

Avatar

Level 1

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/dev...

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 5

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/dev...

View solution in original post

3 Replies

Avatar

Community Advisor

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)

 

MukeshYadav__0-1724788325700.png

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-cont...

Thanks

Avatar

Correct answer by
Level 5

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/dev...

Avatar

Administrator

@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!



Kautuk Sahni