Download the custom package from : http://www.wemblog.com/2011/11/how-to-create-package-based-on-xpath-in.html
1) Install package using package manager
2) go to <host>:<port>/apps/tools/components/createPackage/run.html
3) Give your Xpath in xpath value
4) You can also add comma separate exclude path that you don't want to add to package.
5) Click on Create config package
6) Now Download the package and also be saved under /etc/packages/CQSupportTool
For example if you have to create package of all ACL to migrate from one CQ instance to another you can use xpath query for package as //element(*,rep:ACL)
Example:
Ref: http://www.wemblog.com/2011/11/how-to-create-package-based-on-xpath-in.html
1) Install package using package manager
2) go to <host>:<port>/apps/tools/components/createPackage/run.html
3) Give your Xpath in xpath value
4) You can also add comma separate exclude path that you don't want to add to package.
5) Click on Create config package
6) Now Download the package and also be saved under /etc/packages/CQSupportTool
For example if you have to create package of all ACL to migrate from one CQ instance to another you can use xpath query for package as //element(*,rep:ACL)
Example:
Ref: http://www.wemblog.com/2011/11/how-to-create-package-based-on-xpath-in.html
how do I add filters??? I just do not want to export all the users and permissions. I just want to export our own company users,permissions.. I have created 'abc' node of type authorizableFolder in groups and users, and I have included groups and users of mine. How do i extract only my users and permissions. Could you please help me
ReplyDeleteactually the package is not working now, It used to work before, but not now..
ReplyDeletegetting the following error now,,
Component that threw Exception: /apps/tools/components/createPackage/POST.jsp
Exception:
org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 51 in the generated java file
Only a type can be imported. com.day.cq.packaging.CQPackageManager resolves to a package
An error occurred at line: 78 in the jsp file: /apps/tools/components/createPackage/POST.jsp
CQPackageManager cannot be resolved to a type
75: packages.getNode(packPath).remove();
76: packages.getSession().save();
77: }
78: CQPackageManager pckgManager = sling.getService(CQPackageManager.class);
79: JcrPackage pack = pckgManager.createPackage(sess,pkgGroupName,packageName);
80: pckgManager.ensureVersion(pack);
81: DefaultWorkspaceFilter filters = new DefaultWorkspaceFilter();
An error occurred at line: 78 in the jsp file: /apps/tools/components/createPackage/POST.jsp
CQPackageManager cannot be resolved to a type
75: packages.getNode(packPath).remove();
76: packages.getSession().save();
77: }
78: CQPackageManager pckgManager = sling.getService(CQPackageManager.class);
79: JcrPackage pack = pckgManager.createPackage(sess,pkgGroupName,packageName);
80: pckgManager.ensureVersion(pack);
81: DefaultWorkspaceFilter filters = new DefaultWorkspaceFilter();
at org.apache.sling.scripting.jsp.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.sling.scripting.jsp.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.sling.scripting.jsp.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:136)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:290)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:277)