Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Unpublished Content backup

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

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.

View solution in original post

3 Replies

Avatar

Community Advisor

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

Avatar

Level 1

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

Avatar

Correct answer by
Level 8

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

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.