Step 4 : Migration definition XML
We need to perform the first three steps defined in the previous post, but this will be a one time activity to export group information and obtain the folder structure at 'Base path' (I will come to defining base path later in this post). While performing step 4 for the first time, save the migration definition before launching it. This file gets downloaded as an XML file and the contents of the same are as shown below.
The file has a tag <Options> which defines the operation to be performed during the import. It has the same value which we choose during the 'Import Operation Type' - Create/Update, Create, Update, Delete.
We will be creating two such files and save them as 'ImportCreate' and 'ImportDelete' to signify the operation they perform.
Life Cycle Management also comes as a command line utility to initiate LCM. This utility is placed under <Installation drive>:\Oracle\Middleware\user_projects\epmsystem1\bin. This utility can be executed from any command line interface in Windows (Utility.bat) or Unix (Utility.sh). The documentation for the same is available on Oracle website.
The syntax for executing the utility is:
Utility.bat <migration definition XML> -b <base path>
Migration definition XML : The XML file saved during the Migration definition XML step
Base Path: The file system path where all exports & imports are stored. The utility provides the ability to move the exported folder to any other location and define that path as base path. Make sure the new path does not have spaces or special characters in its name.
Let us first try removing few users from the group 'GrpCtrl'. We enter 'E001', 'E002' in the 'Groups.csv' and execute the utility. Moreover we move the GroupExport folder and the xml files to C:\ to provide an easy file location.
Utility.bat C:\ImportDelete.xml -b C:\
On executing the utility with a fresh xml file, the utility asks for user name and password.
One thing to observe is that the ImportDelete.xml gets updated with this username and encrypted password which was initially not present in the file.
Lets check the group properties. We find E001 and E002 are no longer part of GrpCtrl.
Now lets add few users to a different group 'GrpEast'. We enter 'E004', 'E006' in the 'Groups.csv' and execute the utility.
Utility.bat C:\ImportCreate.xml -b C:\
On checking the properties, we see the users get added to 'GrpEast' while they still exist to be part of 'GrpCtrl'.
Its done !!!
We can further automate this process by saving this command as a .bat file and pass the XML as parameter to perform desired operation. Let me know your comments.