Unpublished Content backup | Community
Skip to main content
May 14, 2018
Solved

Unpublished Content backup

  • May 14, 2018
  • 3 replies
  • 2169 views

Hi All,

I have a requirement to copy all unpublished contents in the Author instance and save it in another server as a backup on daily basis. Is there a way to filter unpublished pages in the author and make a package of it.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Hemant_arora

You can use the following example in AEM fiddle tools and create a dynamic package.

Adobe Experience Manager Help | Creating Adobe Experience Manager Packages using the JcrPackageManager.API

Here are the steps:

1) Install ACS commons and tools package

2) Open AEM fiddle tool http://localhost:4505/etc/acs-tools/aem-fiddle.html

Select servlet option

tweak the code given in the above link according to your requirement for example execute the query to find out all pages which does not have cq:lastReplicationStatus as activated. Add the results of the query to a collection PathFilterSet

Click run and you are done. No need to build the project

Just write code and run.

3 replies

arunpatidar
Community Advisor
Community Advisor
May 14, 2018

There is no such possibility at the moment filtering content based on property from package manager. I would suggest to use Query Builder to get all the unpublished page and then package.

http://localhost:4502/libs/cq/search/content/querydebug.html

Example query:

type=cq:Page

path=/content/AEM63App/en

property=jcr:content/cq:lastReplicationAction

property.value=Activate

property.operation =not

Thank

Arun Patidar
May 14, 2018

Thank you. We are using AEM 6.0. I will test this.

Hemant_arora
Hemant_aroraAccepted solution
Level 8
May 14, 2018

You can use the following example in AEM fiddle tools and create a dynamic package.

Adobe Experience Manager Help | Creating Adobe Experience Manager Packages using the JcrPackageManager.API

Here are the steps:

1) Install ACS commons and tools package

2) Open AEM fiddle tool http://localhost:4505/etc/acs-tools/aem-fiddle.html

Select servlet option

tweak the code given in the above link according to your requirement for example execute the query to find out all pages which does not have cq:lastReplicationStatus as activated. Add the results of the query to a collection PathFilterSet

Click run and you are done. No need to build the project

Just write code and run.