AEM Instance migration is common in real world , Package manager does help when you want to move users and groups privileges from one AEM instance to another.
User Migration Steps :
- Go to package manager
- Create a package for user migration and add below filters and rules.
- Add filter : /home/users
- Exclude Tokens : AEM implemented user token based authentication , all tokens will be stored under appropriate user node as rep:token node type.So we have to exclude tokens from package otherwise CRX will not allow to install package and throws javax.jcr.nodetype.ConstraintViolationException Exception.
- Exclude Admin & Anonymous users : CRX doesn’t allow to move or delete admin users,As these users has lockable node property hence cannot be copied on destination instance.
- Add rep:policy : All Users ,resource based permissions will be stored in rep:policy nodes ,So add root rep:policy user permission node to package.
- Click save.
- Build the package and download.
- Unzip the package and open META-INF/vault/filter.xml in a text editor
Add mode=”merge” to the filter tag, for example:
<?xml version="1.0" encoding="UTF-8"?>
<filter root="/home/users" mode="merge">
- re-zip the package and install in new AEM instance .