1. Home
  2. Restoring Application Specifications in m-Power

Restoring Application Specifications in m-Power

One must be running any version of m-Power on or after the October 2020 update to utilize this document.

Overview

As developers create applications in m-Power, metadata (data about their applications) are stored in an embedded Derby database that is installed on the m-Power server. In the past when developers have wanted to restore the application specifications of one application, there was not a way to do so without restoring the whole Derby database from a previous backup. This meant if you edited five application specifications one day, and the next day wanted to revert the application specifications of just one of those applications, you would have to restore the previous day’s backup and revert the changes made to all five applications.

As of the October 2020 update, developers can restore the application specifications of just one single application if needed. These specifications include, but are not limited to, the Data Model (Tables/Fields, Dimensions, Filters, Calculations), Template Properties, Smartlinks, and External Objects.

This example and steps that follow will assume the application I want to restore a prior version of is Retrieval #1 in a dictionary MRCTRAIN20 (MRCTRAIN20.I00001s).

Steps

Step 1. Find the desired backup file

Every time an application is compiled, a new JSON file with a blueprint of all your application specifications is written to a folder on the m-Power server in /m-power/mrcwebgui/WEB-INF/specs/DD/#####/:

JSON Files on the m-Power server
Figure 1: The JSON files associated with an m-Power application.

Sorting by the date modified, the file with the most recent date (in this case 10/29/2020) is the current version of the application specifications. The JSON file from the previous day (10/28/2020 at 4:28PM) contains the application specifications I want to restore.

Step 2. Restore the backup JSON file

Copy the JSON file from Step 1, and paste it into the /m-power/mrcjava/WEB-INF/classes/DD/ folder:

JSON Files on the m-Power server

The existing version (highlighted in yellow) must be overwritten. I will delete this existing ‘I00001s.json’ file, and rename my backup (highlighted in blue) to this same name.

JSON Files on the m-Power server

Step 3. Recompile the application

Once the file on the server has been restored, the final step is to recompile the application. In the m-Power development UI, I’ll find my app in the Application Listing and edit it.

Press the ‘Build App’ and recompile the application.

JSON Files on the m-Power server

Note: Restoring a prior JSON file will not overwrite any existing m-Painter (HTML) customizations, granted you say ‘No’ to overwriting the HTML presentation layer when recompiling. If you need to restore a specific previous version of your HTML painting, this can be done using m-Painter’s versioning feature.

Updated on August 8, 2023

Was this article helpful?

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
CONTACT SUPPORT