Promote Menu Data
This document is applicable for m-Power clients who connect to different databases for their development and production applications. In this case, developers often have challenges in migrating their menu data from their development database to their production database. This documentation will cover how to achieve this.
Exporting Menu Data
To begin, ensure that your "Application Menu and Security" looks like the following:
If it does not, please consult this document to learn about converting your menu.
Click on the "Promote Menu Data" button.
You will most likely want to promote all of your menuing data, so click the "Select all" link, then press "Export Selected Data." Once successful, you will see a green success message.
Note: If you've modified any of your MRCSEC objects to be views, please do not select them as this will cause the import process to fail.
On your m-Power server, we have created for you a file in /mrcjava/WEB-INF/data/ with a name of "menu-export" plus an EPOCH time. This file should not be edited. You will need to move this file into the same location within your production instance.
Importing Menu Data
The process of allowing data to be imported into your production instance is disabled by default. To enable it, please add the following code to your production /WEB-INF/web.xml file, directly before the tag:
<web-resource-name>mrc Data Migration</web-resource-name>
<realm-name>mrc Data Migration</realm-name>
Once completed, save your changes and restart Tomcat.
Assuming your production instance is at 220.127.116.11, direct your browser to: https://18.104.22.168/mrcjava/servlet/mrc.Migrate
You will be prompted to log in. Unless you have already changed (recommended), the user of mrcuser/mrcuser will allow access.
Note: Any user in the manager-gui role as defined in /m-power/tomcat/conf/tomcat-users.xml will have access.
Once authenticated, you will see the following screen:
Select the file you would like to import into the production database, and click Import. During this process, m-Power will create the files on your production database, if they don't already exist. If they do, m-Power will adjust the existing data accordingly and update the production database.