AEM 6.x


The instructions below must be run on Mac OS, Linux, or Windows (on Cygwin) with cURL, Python and Java SDK installed:

  1. Go to http://src-aem-host:port/crx/packmgr/index.jsp and log in as admin.

  2. Create a package named "ACL-migration"

  3. Click the Edit button.

  4. Select the Advanced tab and set AC Handling mode to Merge.

  5. Save.

  6. Build the package and download it.

  7. On the file system run this command on the package to extract the META-INF/vault/filter.xml file:

    jar -xvf ACL-migration-1.0.zip META-INF/vault/filter.xml

  8. In the same directory, run this command to download a json file of the ACL paths from the source instance (set the username and password and correct host):

    curl -u admin:admin 'http://aemhost/crx/de/query.jsp?' -G --data-urlencode '_dc=1507011481908&_charset_=utf-8&type=xpath&stmt=/jcr:root/content//element(*,rep:ACL)&showResults=true' > data.json

  9. Create a file generate-package-filter.py and paste the python code below inside it:

    import json
    from pprint import pprint

    with open('data.json') as data_file:
    data = json.load(data_file)

    print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
    for item in data["results"]:

  10. Run the python script from the same folder where data.json was created and save the output to META-INF/vault/filter.xml (replacing the existing contents of filter.xml):

    python generate-packge-filter.py > META-INF/vault/filter.xml

  11. Use this command to update the filter.xml within the zip file:

    jar -uvf ACL-migration-1.0.zip META-INF/vault/filter.xml

  12. Upload the zip file to the source instance package manager: http://src-aem-host:port/crx/packmgr/index.jsp

  13. Click Build or Rebuild to build the package.

  14. Download the package from the source AEM server.

  15. Upload the package to the destination AEM server's package manager: http://dst-aem-host:port/crx/packmgr/index.jsp

  16. Click Install to install it.

Šis darbas yra licencijuotas pagal licenciją „Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License“  „Twitter™“ ir „Facebook“ skelbimams „Creative Commons“ sąlygos netaikomos.

Teisiniai pranešimai   |   Privatumo internete politika