While developing WebFOCUS BI applications, you will invariably experience a “Duh!” moment. You just saved something bad to the development server and immediately wish you could somehow undo a potentially time-consuming mistake.
One way to ensure you can get the coding equivalent of a golfing “Mulligan” is by adopting a practice of creating personal backups of your BI applications. With earlier snapshots of the application available, you can virtually go back in time and get code as it was before your poorly-made change.
Having a personal backup saves you the embarrassment of groveling to the system administrator to see if he might be able to find your files within last night’s system backup.
Where to Keep Personal Backups
Because I often work at the client site and on their systems, I typically keep a backup library on a removable thumb drive. For my own company’s development, I keep backups on a USB extension hard drive.
For my personal backups, I (almost daily) create a folder with the name of the client and date of the save, for example: “ABC Financial Dashboard (2011 Oct 17). “While a backup done each morning is usually sufficient, if I am getting ready to do something major in the afternoon after having already done quite a bit of development in the morning, I may make a “PM” version in addition to the original “AM” one.
I group all of these daily backup folders into a parent folder for that particular client. On a regular basis, I might go back and weed out all of the duplicates. For example, I have been making regular backups of the BI Consolidator software application for about ten years. Every so often, I clean out this important backup folder by deleting all but one version for each previous month.
How to Create Personal Backups
Components of WebFOCUS applications can exist on multiple platforms in a variety of libraries. So when creating a personal backup, remember to capture a snapshot of the important pieces on both the WebFOCUS Report Server and the Managed Reporting web tier.
On the WebFOCUS Report Server, you typically have an application folder which at the least contains metadata. In addition to this one, there may be other important folders in the path as well (e.g., the always-present BASEAPP or perhaps a shared template folder), so consider backing up more than just your application folder.
Backing up the WFRS application folders is straight-forward and we can use the Developer Studio Windows-based product to just copy and paste. There are two places to view the WFRS application folders, the first being near the top under the Data Server (EDASERVE) view.
When using this DataServer view, Developer Studio provides a segregated look at the different components and groups them into virtual folders. That makes backing up all of the files difficult. A more appropriate view for backups can be found at the bottom of the Developer Studio tree on the left-hand side under “WebApplications.”
With this view, Developer Studio displays all of the components in the WFRS application folder in a simple list. To create a backup, select all of these files and copy them to the Windows clipboard.
Then, paste the WFRS files into the current day’s backup folder. If you need to backup multiple application folders, you might want to create a separate backup folder for each (e.g., BASEAPP, FINANCE, and OPERATIONS).
The Managed Reporting Environment on the web server is a bit more complex. There is security information, real and descriptive names, and so forth. Luckily, Information Builders created a Change Management feature for exporting MRE applications from one image and importing them into another. For our backup purposes, we can just let WebFOCUS perform an export and keep the zipped archive file as our MRE backup.
From the MRE Main Menu (the /ibi_apps/ link), click on the “Managed Reporting Change Management Extract” feature. From the next screen, select from the MRE tree on the left the MRE Domain you want to backup. Although we typically only work in one MRE Domain at a time, remember to backup all the ones that are being actively modified as part of your application development effort.
Check the option to download the file and click on the button to create a Change Management Package. The web page will give you a Save dialog box and let you write the resulting zip archive file into your backup folder.
When You Need to Restore
When you have that “oh crap” moment during WebFOCUS application development, just go back to your backup folder. Find the earlier version of the code you messed up and open the file with a text editor such as Notepad. Select all and copy it to the Windows clipboard. Then go into Developer Studio, open the bad code with the IDE text editor and paste in the copied earlier version.
Of course, you may want to make a quick backup of the bad code first. Hopefully, you can use something and not have to entirely recreate the work you lost by reverting to the backup version. Still, this is a better option than being under stress to correct an existing problem on the development server (by the way, you would never develop on the production server, right?).
Yes, even You will stumble into a self-imposed dumb experience. Taking the time to be a little paranoid and make personal backups is a smart thing to do.