Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Empty folder deleted from PROD before it was unpublished

Avatar

Level 1

Hi - During archiving, an empty folder was accidentally deleted from PROD before being unpublished in the public media manager site. Is there a way to recover it in PROD in order to unpublish first and then re-delete?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@ElizabethRe2 Simply create a new folder with the same name, and the following : publish it --> unpublish it --> delete from Author

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

@ElizabethRe2 Simply create a new folder with the same name, and the following : publish it --> unpublish it --> delete from Author

Avatar

Level 7

Hi @ElizabethRe2 

if it was not an empty folder and versioning were enabled then I would recomend you to retore the folder from previous version like: Solved: recovering a deleted folder on AEM dam on version ... - Adobe Experience League Community - ...

 

But since it is empty:  I will go with @Harwinder-singh !

Avatar

Level 4

If you know the exact paths in publisher, and just want to clear the orphaned nodes in publisher, you can use distribution agent to delete nodes at publisher. 

You can refer to this article 

https://medium.com/@bsaravanaprakash/orphaned-resources-in-aemcaas-publisher-programmatic-deletion-o...

 

and this adobe documentation

https://experienceleague.adobe.com/en/docs/experience-cloud-kcs/kbarticles/ka-22828

 

If it is less nodes, you can 

  1. On Author, navigate to Tools > Deployment > Distribution > Publish/Preview > Distribute.

  2. Input the following value.

    • Action: Delete
    • Path Browser: Target Path
  3. Click on Submit.

If more nodes, then you can use a curl command to delete at publisher 

curl -v -u user:user -d “action= DELETE” -d “path=/content/dam/orphaned-asset-only-in-publisher.jpg” https://author-p1234-e1234.adobeaemcloud.com/libs/sling/distribution/services/agents/publish