Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Page Exporter API target location

Avatar

Level 2

Hi

I need to export my entire website and for that i am using export method of page exporter API 

export(page, resourceResolver, target location). 

My pages are getting exported inside /var/contentsync folder in crxde itself. i need it in my local machine.

I deleted /var/contentsync folder and then also, i am unable to download the zip in my  local.

 

please help.

 

Thanks,

Ankita

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

you can download pages over request using export selector with zip extension.

https://helpx.adobe.com/experience-manager/6-2/sites/administering/using/page-exporter.html

 

You can create a package once the content once /var/contentsync and then download package using curl/Java/UI.



Arun Patidar

View solution in original post

8 Replies

Avatar

Correct answer by
Community Advisor

you can download pages over request using export selector with zip extension.

https://helpx.adobe.com/experience-manager/6-2/sites/administering/using/page-exporter.html

 

You can create a package once the content once /var/contentsync and then download package using curl/Java/UI.



Arun Patidar

Avatar

Level 2
can you please share the complete command which i can use in this scenario.

Avatar

Level 2
i need to download the zip via sling servlet invoking, so curl wont help.

Avatar

Community Advisor
you can convert this code in java. It is the get request request I guess. example - https://helpx.adobe.com/experience-manager/using/aem64_download_dam_assets.html


Arun Patidar

Avatar

Level 2

export method is throwing WCM exception. I am unable to find out the reason.

Here is my code snippet

Map<String,Object> param = new HashMap<String,Object>();
param.put(ResourceResolverFactory.SUBSERVICE, "dataread");
resourceResolver=null;

resourceResolver=resolverFactory.getServiceResourceResolver(param);

//url
String url="content/demo/en";
Resource resource=resourceResolver.resolve(url);
page=resource.adaptTo(Page.class);
resp.setContentType("application/zip");
resp.setHeader("Content-Disposition", "attachment;filename=maximHtml.zip");

pageExporter.export(page, resourceResolver, "C:\\Users\\admin\\Downloads");
log.info("zip is sent");

 

Avatar

Level 2
Hi, i wrote some backend logic to download the zip in my local and it worked. Thanks everyone..

Avatar

Employee

I wrote a small app recently that does this so I could debug a product issue with content-sync.  You can download it here:

https://documentcloud.adobe.com/link/track?uri=urn%3Aaaid%3Ascds%3AUS%3A52ae18bd-a1c4-48e6-b63f-25e3...

 

The app is under /apps/test/test.jsp

You run it by going to /apps/test.html