Overview
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 and copy over this data via m-Power.
Exporting Menu Data
To begin, navigate to the Admin -> Legacy Admin -> Users Menu & Security -> Promote Menu Data
Click on the “Promote Menu Data” button shown above. The following screen will appear:
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.
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 in the filename. 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 development /WEB-INF/web.xml file, directly before the final lines “</web-app>” tag:
<servlet>
<servlet-name>ImportData</servlet-name>
<servlet-class>mrc.ImportData</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ImportData</servlet-name>
<url-pattern>/servlet/mrc.Migrate</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>mrc Data Migration</web-resource-name>
<url-pattern>/servlet/mrc.Migrate</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager-gui</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>DIGEST</auth-method>
<realm-name>mrc Data Migration</realm-name>
</login-config>
Once completed, save, promote the file to production and restart Tomcat.
Assuming your production instance is at 1.2.3.4, direct your browser to /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.
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.