{"id":8862,"date":"2018-02-09T11:09:04","date_gmt":"2018-02-09T17:09:04","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/docs\/?page_id=8862"},"modified":"2023-07-06T15:33:57","modified_gmt":"2023-07-06T20:33:57","slug":"promote-menu-data","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/promote-menu-data","title":{"rendered":"Promote Menu Data"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>This document is applicable for m-Power clients who connect to <b>different<\/b> 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.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">Note, this documentation is only supported for menus that include the MRCSEC6 and MRCSEC7 tables.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exporting Menu Data<\/h2>\n\n\n\n<p>To begin, navigate to the Admin -> Legacy Admin -> Users Menu &amp; Security -> Promote Menu Data<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/docs\/vue-images\/menuprom1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Click on the &#8220;Promote Menu Data&#8221; button shown above. The following screen will appear:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/docs\/images\/menuprom2.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>You will most likely want to promote all of your menuing data, so click the &#8220;Select all&#8221; link, then press &#8220;Export Selected Data.&#8221; Once successful, you will see a green success message.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\"><strong>Note:<\/strong> If you&#8217;ve modified any of your MRCSEC objects to be views, please do not select them as this will cause the import process to fail.<\/p>\n\n\n\n<p>On your m-Power server, we have created for you a file in \/mrcjava\/WEB-INF\/data\/ with a name of &#8220;menu-export&#8221; 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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Importing Menu Data<\/h2>\n\n\n\n<p>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 &#8220;&lt;\/web-app>&#8221; tag:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code> &lt;servlet>\n &lt;servlet-name>ImportData&lt;\/servlet-name>\n &lt;servlet-class>mrc.ImportData&lt;\/servlet-class>\n &lt;\/servlet>\n &lt;servlet-mapping>\n &lt;servlet-name>ImportData&lt;\/servlet-name>\n &lt;url-pattern>\/servlet\/mrc.Migrate&lt;\/url-pattern>\n &lt;\/servlet-mapping>\n &lt;security-constraint>\n &lt;web-resource-collection>\n &lt;web-resource-name>mrc Data Migration&lt;\/web-resource-name>\n &lt;url-pattern>\/servlet\/mrc.Migrate&lt;\/url-pattern>\n &lt;\/web-resource-collection>\n &lt;auth-constraint>\n &lt;role-name>manager-gui&lt;\/role-name>\n &lt;\/auth-constraint>\n &lt;\/security-constraint>\n &lt;login-config>\n     &lt;auth-method>DIGEST&lt;\/auth-method>\n     &lt;realm-name>mrc Data Migration&lt;\/realm-name>\n &lt;\/login-config><\/code><\/code><\/pre>\n\n\n\n<p>Once completed, save, promote the file to production and restart Tomcat.<\/p>\n\n\n\n<p>Assuming your production instance is at 1.2.3.4, direct your browser to \/mrcjava\/servlet\/mrc.Migrate:<br>You will be prompted to log in. Unless you have already changed (recommended), the user of mrcuser\/mrcuser will allow access.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note:<\/strong> Any user in the manager-gui role as defined in \/m-power\/tomcat\/conf\/tomcat-users.xml will have access.<\/p>\n\n\n\n<p>Once authenticated, you will see the following screen:<\/p>\n\n\n\n<p><br><img decoding=\"async\" src=\"\/docs\/images\/menuprom3.jpg\"><\/p>\n\n\n\n<p>Select the file you would like to import into the production database, and click Import. <\/p>\n\n\n\n<p>During this process, m-Power will create the files on your production database, if they don&#8217;t already exist. If they do, m-Power will adjust the existing data accordingly and update the production database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[257],"ht-kb-tag":[],"class_list":["post-8862","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-security"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/8862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=8862"}],"version-history":[{"count":15,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/8862\/revisions"}],"predecessor-version":[{"id":14464,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/8862\/revisions\/14464"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=8862"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=8862"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=8862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}