Environment

AEM 6.x

Steps

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\"?>")
    print("")
    for item in data["results"]:
    print("".format(path=item["path"]))
    print("")

  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.

Denna produkt är licensierad enligt en Creative Commons Erkännande-Ickekommersiell-Dela Lika 3.0 Unported-licens  Twitter™- och Facebook-inlägg omfattas inte av villkoren i Creative Commons-licensen.

Juridiska meddelanden   |   Onlinesekretesspolicy