Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

sync from prod to stage, without overriding the pages in stage

Avatar

Level 4

Hi All, 

 

QA team and authors are creating a lot UAT pages in stage under below path for testing new upcoming go-live 

/content/project/siteA/, 

/content/project/siteB, 

And busines team creating pages in prod under same path very frequently, we have basic auth for this in prod, so business user creates and test. 

 

Authors asking for a content sync for same nodes from prod to stage for newly pages created. 

 

But when we do content sync the same node will over-ride in stage. But authors and QA team need content sync for newly created prod pages to stage and as well as all the UAT pages should remain in stage. UAT pages are created random location in stage and in prod business also creating the pages randomly. 

 

Can anyone help here for incremental content sync without over -riding pages in stage. 

 

Simply I need all the pages from prod to stage for above paths and all the stage pages also should be available for QA team after content sync

 

Thanks for the inputs

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Ricky99999 ,

You just need to change the merge mode of the package

Steps to change the filter mode

Create the package with the required path through the AEM package manager(http://localhost:8080/crx/packmgr/index.jsp) and download to the local file system

AnmolBhardwaj1808_0-1655197351085.png

 

Unzip the package zip file on your computer(execute through command prompt or terminal) — jar -xvf test_mode-1.0.zip META-INF/vault/filter.xml

Open the file META-INF/vault/filter.xml in a text editor.

Add mode=”merge” to the <filter …> tag, the merge mode should be added to all the required filters defined in filter.xml:

<?xml version=”1.0" encoding=”UTF-8"?>
<workspaceFilter version=”1.0">
<filter root=”xxxxx” mode=”merge” >
<exclude pattern=”xxxxx” />
</filter>
<filter root=”xxxx” mode=”merge”/>
</workspaceFilter>

e.g

<?xml version=”1.0" encoding=”UTF-8"?>
<workspaceFilter version=”1.0">
<filter root=”/content/we-retail/us/en/products/men” mode=”merge” />
</workspaceFilter>

Re-zip the modified package contents so it includes the filter.xml changes — jar -uvf test_mode-1.0.zip META-INF/vault/filter.xml

AnmolBhardwaj1808_1-1655197351737.png

 

Upload the modified package to target server through package manager— the filter changes(“merge” mode) will make sure the target server changes are not overwritten.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Ricky99999 ,

You just need to change the merge mode of the package

Steps to change the filter mode

Create the package with the required path through the AEM package manager(http://localhost:8080/crx/packmgr/index.jsp) and download to the local file system

AnmolBhardwaj1808_0-1655197351085.png

 

Unzip the package zip file on your computer(execute through command prompt or terminal) — jar -xvf test_mode-1.0.zip META-INF/vault/filter.xml

Open the file META-INF/vault/filter.xml in a text editor.

Add mode=”merge” to the <filter …> tag, the merge mode should be added to all the required filters defined in filter.xml:

<?xml version=”1.0" encoding=”UTF-8"?>
<workspaceFilter version=”1.0">
<filter root=”xxxxx” mode=”merge” >
<exclude pattern=”xxxxx” />
</filter>
<filter root=”xxxx” mode=”merge”/>
</workspaceFilter>

e.g

<?xml version=”1.0" encoding=”UTF-8"?>
<workspaceFilter version=”1.0">
<filter root=”/content/we-retail/us/en/products/men” mode=”merge” />
</workspaceFilter>

Re-zip the modified package contents so it includes the filter.xml changes — jar -uvf test_mode-1.0.zip META-INF/vault/filter.xml

AnmolBhardwaj1808_1-1655197351737.png

 

Upload the modified package to target server through package manager— the filter changes(“merge” mode) will make sure the target server changes are not overwritten.