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/#####/:
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:
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.
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.