Unpublished Content backup | Community
Skip to main content
New Participant
May 14, 2018 6:50 AM UTC
Solved

Unpublished Content backup

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.
Hemant_arora
Hemant_aroraAccepted solution
Level 8
May 14, 2018 9:41 AM UTC

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

Hemant_arora
Hemant_aroraAccepted solution
Level 8
May 14, 2018 9:41 AM UTC

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.

Translate
New Participant
May 14, 2018 7:31 AM UTC

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

Translate
arunpatidar
New Participant
May 14, 2018 7:19 AM UTC

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

Translate
Arun Patidar