APPBACKUP Documentation (OpenInsight Specific)
At 19 MAR 2000 07:07:22PM Mark Plasko wrote:
I'm porting a Pick-based app to OI, and so far, so good. Looking into the future, I see a need for a reliable means of data restoration in case of GFE data corruption. In Pick-based systems, individual records can be restored using a SEL-RESTORE command from tape (records existing on tape will automatically be restored to the file if the record does not exist on disk).
If the damage is severe enough in an OI LH file, the whole file can be replaced from a tape, but if I only need to restore the records removed by a GFE fix, is there a similiar method of doing a selected restore just for the missing records?
I've also seen reference to an OI stored procedure titled $APPBACKUP. I can't find any reference material on what this procedure does. Can someone point me to the proper place?
At 19 MAR 2000 08:04PM Don Bakke wrote:
Mark,
You would need to write a custom routine to restore records from an archival system. When you perform GFE fixes you can look at the DUMPLH_FIX_GARBAGE table for the keys that need to be restored.
$APPBACKUP is a procedure that the window APPBACKUP uses to execute it's functionality. AFAIK, it cannot be run as a standalone routine. APPBACKUP is primarily a tool for backing up your application components, although it does provide a way to backup your data tables as well. I don't believe there is any documentation as it was developed originally as a tool to allow beta testers to migrate their applications to newer versions of OI. It's pretty self-explanatory once you run the window.
The tool does work pretty well for what it was designed for. You can test it by running the APPBACKUP window in the OpenInsight Executables-]OpenInsight Form Executables section of the Application Manager. However, this does not help you with your immediate goal.
At 20 MAR 2000 04:10AM Richard Hunt wrote:
I am familure with the proceedure you explained, the pick version i mean. OI or AREV does not have that type of proceedure.
I would suggest that you could write the records indivually into a sequential file. hmmmm like the @id could be the first field and then the @record could be field 2 thru the rest.
Then if you have to restore, you could have a program sequentially read from the file. And then check if that record exists. If it does not exist, then write the record to the file.
Once you read sequentially from the sequential file, you can extract the @id and the @record like this…
@id=seq_record
@record=delete(seq_record,1,0,0)
The hard part is to be able to sequentially write the backup file, and to sequentially read the restore.
I have found such demand for sequential files, that I have created a series of stored proceedures to handle sequential files. They are very handy…
seqclear - clears the sequential file.seqclose - closes the sequential file.seqcount - gets the count of items in the sequential file.seqcreate - creates the sequential file.seqdelete - deletes the sequential file.seqopen - opens an existing sequential file.seqread - reads a line of data from a sequential file.seqwrite - writes a line of data to the sequential file.By default the sequential file lines are delimited (seperated) by a CRLF (carrage return, line feed) (char13, char10). You can override the delimiter to anything you wish.
At 20 MAR 2000 02:39PM B. Cameron wrote:
Mark,
As a Pick person myself I would recommend that you get familiar with the Database Manager section of OI. Using the table verify and GFE fixer/finder as well as the LH table info will give you greater comfortability.
Also, remember that these tables are dos/windows files and some of the standard PC functionality can be used to copy. I have restored
files/tables from Backup Exec when needed by simply replacing the
rev000000.lk .ov files.
As for single items, if you have a copy of the oi app on another machine or you store mirror's of the oi lh data you can use the
system editor in OI to open an item that is missing or corrupt (from the backed up one) then hi-lite copy (ctrl-c) and then open the live app and paste using the system editor.
I also have a little window I created that will let you do TCL like commands and store in a stacker fashion until you get used to the system editor.
Regards,
B. Cameron
At 21 MAR 2000 09:30PM Mark Plasko wrote:
Thanks for your help, folks. This discussion board is the remedy for those undocumented neat stuff blues.
Mark