IBACK: IBAK & IRES Hard Disk Backup and Restore Programs Copyright (C) 1986 Charles E. Hawkins Qualitech P.O. Box 110 Corryton, TN 37721 Table of Contents: Sample IBAK Session 1 Sample IRES Session 2 Overview 3 IBAK Details 4 IRES Details 6 Program Rights and Restrictions 7 Future Plans 8 Problems 9 1 Sample IBAK Session: A>ibak IBAK version x.x--mm/dd/yy Copyright (C) 1986 Charles E. Hawkins Enter today's date (1-8 characters): 860214 Enter destination drive (A-P): a Enter drive to back up, if no more: b Enter drive to back up, if no more: c Enter drive to back up, if no more: d Enter drive to back up, if no more: Enter user area to backup, 'ALL', or if no more: 1 Enter user area to backup, 'ALL', or if no more: 2 Enter user area to backup, 'ALL', or if no more: Date: 860214 Destination drive: A Source drives: B, C, D User areas: 1, 2 OK to continue (y/n)? y Insert backup disk # 1 and press Selecting Files B: 1, 2 C: 1, 2 D: 1, 2 Forming Index B: 1, 2 C: 1, 2 D: 1, 2 53 files selected, 3 blank disks will be needed. B1:860214 .@@@ 14 . B1:SYSLIB1 .LBR 476 . B1:SYSLIB2 .LBR 624 . B1:EZCPR .LBR 462 . B1:ZCPR10 .LBR 652 . B2:DUU .LBR 78 . B2:CPM .MQC 14 . B2:CPM-BEST.TQT 39 . B2:SUPSUB12.LBR 263 Insert backup disk # 2 and press + B2:SUBSUB12.LBR 263 . B2:UNSPOL35.LBR 204 . . . . D2:GLAM .DAT 14 . Backup complete. Press any key to continue: 2 Sample IRES Session: A>ires IRES version x.x--mm/dd/yy Copyright (C) 1986 Charles E. Hawkins Enter drive to restore from (A-P): a Enter drive to restore to, if no more: b Enter drive to restore to, if no more: Enter user area to restore, 'ALL', or if no more: 1 Enter user area to restore, 'ALL', or if no more: Enter file to restore, or if no more: s*.* Restore from drive: A Restore to drives: B User areas: 1 Files: S???????.??? OK to continue (y/n)? y Insert backup disk # 1 and press B1:SYSLIB1 .LBR 476 . B1:SYSLIB2 .LBR 624 . Restore complete. Press any key to continue: 3 Overview: Have you ever gotten a new piece of software and searched all through the documentation for the instructions on how to run it? That is why we have given the sample sessions at the beginning, they will usually be all you need to run IBAK and IRES (together these programs will be call IBACK from here on). We have searched and searched for a good low cost CP/M 2.2 compatible backup program ever since we got our hard disk. There may be one or several, but we couldn't find one. Here's what we wanted a backup program to do: 1) Backup any/all logical drives (mine has 5) 2) Backup any/all user areas 3) Use as few floppies as possible 4) Backup any size file 5) Use any density of floppy drive 6) Be reliable 7) Allow selective restoration 8) Be easy to use 9) Be fast 10) Perform error checking 11) Allow files to be restored to different drives/user areas 12) Allow selected files to be backed up or excluded Well, IBACK does 1, 2 and 6 for sure. We believe it does 3 if we don't count data compression techniques. It will do 4 up to 4 megabytes. As far as my testing so far, it does 4 and 5. And you can tell me how it does on 7. The remaining wish list goes unfulfilled at the present. However, we have found it useful even in its present state. We hope you will too. To accomplish its task, IBACK performs the following steps: 1) Accepts the user input needed to perform the backup 2) Gets destination disk drive parameters 2) Creates a work file on the first drive/user to be backed up 3) Searches all requested directories for files 4) Forms index by adding sizes and calculating disk usage 5) Copies index and all selected files, requesting disks as needed IBACK consists of the following files: 1) IBAK.OBJ the normal standalone backup COM file 2) IRES.OBJ the normal standalone restore COM file 3) IBACK.DOC the documentation file 4) IBAK.RUN the COM file for those with Microsoft's BRUN.COM 5) IRES.RUN the COM file for those with Microsoft's BRUN.COM 4 IBAK Details: On page 1 a sample session of IBAK is given. We will now examine each input, its effect on the outcome, and the messages given and what they mean. Enter today's date . . . : Actually you can enter any 1 to 8 characters here as long as they form a valid CP/M file name. Characters that should not be used include .:?* and a few others. The program will convert any letters to upper case and check for invalid characters. If you enter something the computer does not like, then the message "Invalid entry" will be displayed and you will be prompted to enter the date again. A date such as 12/31/89 or 123189 is recommended and will be assumed from here on. This date is used to name the index and backup files. Enter destination drive (A-P): Enter the drive that you want the files to be copied to. On my system the hard disk is drives B-F and the floppy is drive A. Again your input will be converted to upper case and checked as a valid drive reference. The colon after the drive letter is optional. Enter drive to backup up . . . : Enter the drive that you want to backup. You may enter as many drives as you like, but press after each entry. After you have entered all the drives, press without any input to get the next prompt. You must enter at least one valid reference. Enter user area . . . : Enter the user area that you want to backup. If you want to backup users 0 through 15 then simply type the word all at the prompt. User area numbers may be entered in decimal or hexidecimal. The program can figure it out. Again, error checking is performed to insure valid entry. Also, as in entering the backup drives, you may enter as many user areas as you like. . . . OK to continue . . . : After getting the input from you, IBAK displays back what it thinks you entered and asks for you permission to continue. If you answer n or N then you will be rudely dumped back into the operating system with a "Program Aborted" message. This "feature" will be improved in a future update. Either here or on the next prompt, you may want to type a control P so that you have a hard copy of the files that are backed up. Insert backup disk # 1 . . . : You must have enough BLANK disks to perform the backup. It's not a bad idea to use newly formatted disks for a backup to catch any glitches on the disks. A bad disk will cause IBAK to crash and you will have to start the entire backup again. 5 The program then reads in the drive parameters. All disks used in the backup must have at least as much capacity as the first disk, i.e. you cannot use a disk with lower capacity than the first. Also, if you later use a disk with a higher capacity, it will not be completely filled, but you backup will still be good. On the first drive and user number you input, IBAK will create an index file using the date you input and an extension of .@@@. This file will remain in that area even after the backup is completed. It would be a good idea to rename this file after the backup is done and keep it around just in case something happens to the index on the backup disk (UGH!). If you don't rename it and run IRES, IRES will destroy it. If you have more confidence in your floppies, then simply erase this file. WARNING!--If a file with this name already exists, it will be overwritten! To this index file, IBAK will add all the names of the files to be backed up. After the names are selected, the file sizes are added and the files are mapped to the destination disks. While both these processes are going on, IBAK displays the drive and user area it is working on. After the index file is complete, IBAK will display the # of files selected and the number of disks needed. If you do not have enough blank disks, you may as well kill IBAK at this point or you will only have a partial backup. To kill IBAK, type a control S to halt the output. After IBAK has halted, type a control C. Be SURE and erase any files that IBAK has created on the backup disk. Next, IBAK will begin copying files to the first disk. IBAK will create a file on each backup disk with the date as the file name and the disk number as the extension. The first file copied will (should?) always be the index file. Whenever a disk is completely filled, IBAK will prompt you for another disk. You MUST use blank disks or IBAK will keep asking you for another one. Finally, IBAK will sign off with a message. 6 IRES Details: On page 2 a sample session of IRES is given. We will now examine each input, its effect on the outcome, and the messages given and what they mean. Of course, if all goes well, you'll never need this program, but please check it out on some non-critical files to make sure it works correctly on your system. Enter drive to restore from (A-P): This is obvious, isn't it? Enter drive to restore to . . . : As above, you may enter one or more drives to restore. Please note that you must restore a file to the same drive/user area that the file was originally on and that the restored file will overwrite any existing files by the same name. Enter user area to restore . . . : Also like above. You may enter as many user areas as needed, or the word all for all user areas. Enter file to restore . . . : You may enter any CP/M file name here. As usual, your input will be converted to upper case, so you cannot restore any files containing lower case letters without using wild cards. IRES will accept wildcard file names in much the same way as any other CP/M utility. Examples are: *.*, *.dat, ar000?.dat, etc. . . . OK to continue . . . : Like IBAK, IRES displays your processed input and gets your verification before proceeding. Insert backup disk # 1 . . . : Insert the first backup disk that you want to restore from. The disk must have an IBAK file with an extension of .001. IRES then extracts the needed index information and copies it to the first drive/user area you input. After the restore is completed, this file will be erased. IRES uses this file to restore each file matching the criteria you input. When all selected files have been restored, IRES ends with an appropriate message. 7 Program Rights and Restrictions: Much time and effort has gone into developing IBACK. We feel that by controlling the source code and all modifications, there will not be as much confusion, inconsistencies, and variations as there are in many public domain programs. We therefore ask you to please abide by the following rules regarding its use and distribution: 1) If you find IBACK useful or believe it would be more useful with modifications, please write and tell us your ideas. A suggested contribution of $15 would also be greatly appreciated. We would like to make several enhancements to IBACK but simply cannot afford the time without your help. A contribution will put you on our mailing list for future IBACK updates and information about our other software products. If you send a contribution and would like a printed copy of the documentation, please mention this in your letter. Also, if you send a contribution and can read SSDD 8" disks or Vector Graphics Micropolis disks, we can send you free updates directly with your request. Our address is: Qualitech P.O. Box 110 Corryton, TN 37721 2) You may make as many copies for your own personal use as you wish. 3) You may distribute unmodified copies of the programs to anyone. However, you must display the following messages on the media: Copyright (C) 1986 Charles E. Hawkins, Portions copyrighted by Microsoft, 1981. 4) You may not distribute modified copies of IBACK or printed copies of the documentation. 8 Future Plans: Convert to C and/or assembler for more speed. Add feature to list only the file name information to the printer. Add ability to include/exclude files by name or wildcards. Add an option to erase a backup disk if requested. The program now insists on using only completely blank disks for the backup. Add error recovery, i.e. allow a backup to continue at the correct point if interrupted, or allow a disk to be started over again. Add option to do error checking such as read after write or CRC with warning on a bad restore. 9 Problems: We have been using IBACK for several months now with no problems. However, with any new program, there are usually bugs that creep up only in certain situations. The most likely problem is that IBAK calculates your disk drive capacity wrong and runs out of space. This would be due to a faulty understanding on our part of the CP/M documentation. If IBAK crashes, please let us know. If possible, run the program again to try to duplicate the problem. Type control P to echo the output to your printer and when the program asks you for the date, type in the word DEBUG. This will give us some helpful information about your system that will aid in finding the cause of the problem. Send the printout and any other information that might be helpful to the address given above. Likewise, if for some reason IRES will not restore your files, let us know. If you must get the file, you will have to write a program to extract it from the backup files. Microsoft BASIC will probably be the best language for such a program. You will have to read the index to find the file and then copy it record by record. The index is a fixed length random access binary file in the following format: 1) Source drive 1 byte, ASCII 1 = 'A', 2 = 'B', etc. 2) Source user # 1 byte, contains the ASCII value of the user # 3) Source name 8 bytes, file name padded with blanks if needed 4) Source ext 3 bytes, file extension 5) File length 2 bytes, binary # of 128 byte records in the file 6) Start disk 1 byte, binary backup disk number file begins on 7) Start record 2 bytes, binary, first record on start disk 8) Reserved 14 bytes, reserved for future use