Expand my Community achievements bar.

SOLVED

Moving pages between production and dev environment.

Avatar

Level 3

Hi ,

I have a requirement to move production assets to dev environment. Because some pages were directly added to the prod environment. How can we do that. At present our dev and prod are out of sync, with prod environment far ahead of dev. What can we do to sync dev env with prod?

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi, All the assets along with the pages of an AEM site are present in /apps/content hierarchy in the CRXDE. If you have permissions, you should be able to access the prod's CRXDE using this URL: https://[host]:[port]/crx/de
You can make a package for the same or only the things you want from it by using prod's package manager: https://[host]:[port]/crx/packmgr

To create a package, click on Create Package and give a name to your package.
Now you will see an empty package is created. Now click on edit > filters > add filter
In the root path add the path for the asset that you also want in dev and click on done. Similarly, you can add multiple asset paths by clicking the add filter button again and again.
After adding all the paths, you can click on save.
Now, you have to click on the build button and after successful build you can click on download. This will download the required prod package.

You can now install this package in your dev's CRXDE. To do so, you can click on upload package in the package manager (make sure you open dev's package manager only). Select the prod's downloaded package and check the force upload. Now the package has been uploaded, all there is to install the package by clicking on install.
After installing the package you will see, your dev and prod assests are in sync now.

Note: I suggest you to not make the whole package of /content as it can be very large in size. Select individual asset paths that you really need and make a package for the same.

Fact: For the same task, reverse replication agents are also setup. You can also take help of them.

View solution in original post

8 Replies

Avatar

Level 3

I have already merged the code, but still the environments are not in sync

Avatar

Community Advisor

@vineetham123 

 

Please refer to https://adobe-consulting-services.github.io/acs-aem-commons/features/contentsync/index.html

It can incrementally synchronize content between AEM Author instances.


Aanchal Sikka

Avatar

Level 2

@aanchal-sikka In the documentation you shared, it is saying to create an OSGi configuration for PID org.apache.sling.servlets.get.DefaultGetServlet. Can I get the steps to do this ?

Avatar

Community Advisor

Hello @vineetham123 

 

This is an OOTB configuration.

aanchalsikka_0-1698673389367.png

 

If you testing is locally, update via OSGi console. Else, please add it to code-base, for deployment to server


Aanchal Sikka

Avatar

Correct answer by
Level 3

Hi, All the assets along with the pages of an AEM site are present in /apps/content hierarchy in the CRXDE. If you have permissions, you should be able to access the prod's CRXDE using this URL: https://[host]:[port]/crx/de
You can make a package for the same or only the things you want from it by using prod's package manager: https://[host]:[port]/crx/packmgr

To create a package, click on Create Package and give a name to your package.
Now you will see an empty package is created. Now click on edit > filters > add filter
In the root path add the path for the asset that you also want in dev and click on done. Similarly, you can add multiple asset paths by clicking the add filter button again and again.
After adding all the paths, you can click on save.
Now, you have to click on the build button and after successful build you can click on download. This will download the required prod package.

You can now install this package in your dev's CRXDE. To do so, you can click on upload package in the package manager (make sure you open dev's package manager only). Select the prod's downloaded package and check the force upload. Now the package has been uploaded, all there is to install the package by clicking on install.
After installing the package you will see, your dev and prod assests are in sync now.

Note: I suggest you to not make the whole package of /content as it can be very large in size. Select individual asset paths that you really need and make a package for the same.

Fact: For the same task, reverse replication agents are also setup. You can also take help of them.

Avatar

Level 3

Can I move pages,templates,components etc using your solution?

Avatar

Level 3

Hi @vineetham123, yes..all of these are present inside /content only. For templates, consider making a package of /conf/<your_project>

Avatar

Community Advisor

@vineetham123 ,

If you are using the Adobe Cloud Manager to build and deploy code to the stage and production servers, then you can use the "Content Copy" tool available on the Adobe CM to sync content between PROD -> Stage/DEV.

 

If you are not using the Adobe Cloud Manager, then

  • Create a package with required paths for example:
    • "/content/yourproject"
    • "/content/dam/yourproject/images"
    • "/content/dam/yourproject/videos"
    • /content/dam/yourproject/other-assets"
    • /content/cq:tags/yourprojecttags

Share this package with Adobe CSE if you are on Adobe AMS or your AEM Admin your who has access to PROD Author and ask them to build this package on the PROD Author, then download and share with you. 

You may have to do this maybe once a month or so based on the need.

If the package size if growing larger and larger, make multiple packages for each path and build them on PROD Author and install them on Stage/DEV servers.

If you build only the pages, you will end up with broken images/videos on the pages on DEV. Also, exclude any paths that you don't want to get overridden on DEV server when the package is installed with PROD Content. 

 

Hope this method helps!