Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!ahh From: ahh@j.cc.purdue.edu (Brent L. Woods) Newsgroups: comp.binaries.amiga Subject: MRBackup--A hard disk backup utility (version 2.1). Message-ID: <6532@j.cc.purdue.edu> Date: 29 Feb 88 10:45:04 GMT Organization: Co-Moderators Unlimited. Lines: 734 Keywords: tested, part 1 of 3 Approved: ahh@j.cc.purdue.edu (Brent Woods) Program Name: MRBackup Submitted By: uiucdcs!amanpt1.ZONE1.COM!mrr (Mark Rinfret) Summary: A hard disk backup utility. Poster Boy: Brent Woods (ahh@j.cc.purdue.edu) Tested. Part 1 of 3. NOTES: None. Brent Woods, Co-Moderator, comp.{sources,binaries}.amiga USENET: ...!j.cc.purdue.edu!ahh ARPANET: ahh@j.cc.purdue.edu BITNET: PODUM@PURCCVM PHONE: +1 (317) 743-8421 USNAIL: 320 Brown St., #406 / West Lafayette, IN 47906 ================================================================ This set of 3 shar files contains the binaries and docs for version 2.1 of MRBackup, a hard disk backup utility for the Commodore Amiga. Mark Rinfret #-----------------------------CUT HERE---------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -rw-r--r-- 1 mrr users 29443 Feb 7 18:22 MRBackup.TXT # -rw-r--r-- 1 mrr users 187 Feb 7 13:31 MRBackup.init # -rw-r--r-- 1 mrr users 140 Jan 1 13:40 MRBackup.xcld # -rw-r--r-- 1 mrr users 1324 Feb 8 22:09 icon.uue # echo 'x - MRBackup.TXT' if test -f MRBackup.TXT; then echo 'shar: not overwriting MRBackup.TXT'; else sed 's/^X//' << '________This_Is_The_END________' > MRBackup.TXT X X X X X X X X X X X X X X X X X MRBackup Version 2.1 X X A Hard Disk Backup Utility X X for the X X Commodore Amiga X X 1 February 1988 X X Mark R. Rinfret X X^L X X X X X X X Introduction X X This document describes a program, named MRBackup X (pronounced M R Backup, not Mister Backup :-), which will allow X you to backup the files on an Amiga hard disk drive to floppy X disk media. I wrote MRBackup primarily out of my own need. I also X saw it as a means for learning more about programming the Amiga. X Please take the time to read this document carefully. There are X some fine points ("Now THOSE are some fine points!") about the X program that you won't want to miss. X X MRBackup is reasonably flexible, allowing you to back up X individual directories, directory trees or a whole disk. You can X backup from one directory hierarchy and restore to another. X Incremental backups can be performed based on file modification X dates. MRBackup also uses, at your discretion, the "archive bit" X feature added with release 1.2 of the WorkBench. Just for fun, X MRBackup also talks. Though this is may seem frivolous, the X speech capability provides a method for alerting you that a new X output disk is required for formatting. X X MRBackup is not fast. When choosing a method for packing the X backup data, a fast-scan approach with specialized backup X directory structure was considered. However, there is an inherent X danger in committing multiple files to a specialized file system X which can only be accessed through a solitary piece of software. X I decided to maintain the AmigaDOS file system structure which X has a great deal of integrity and allows the backup media to be X accessed by standard software. When I do it again, I'll probably X go with the specialized approach - the current method is just too X darned slow. X X The user should take a serious and organized approach to X his/her backup methods, however. I highly recommend that backup X listings be kept in a safe place (I use a 3-ring binder) and X backup floppies be stored safe from magnetic damage or other X hazards (like spilled coffee - argh!). A truly committed X individual will backup his entire disk once a month, once a week X and "areas of interest" once a day (default). X X MRBackup attempts to economize on output media usage by X using Lempel-Ziv data compression/decompression (at the cost of X time). This is an option which can be enabled/disabled via menu X selection. The compression routine used was lifted from the Un*x X "compress" program but has been adapted to employ buffering and X native AmigaDOS I/O. X X X Operation X X To use MRBackup, click on the program icon or type MRBackup X at the CLI prompt. A new window will open in which you will see a X^L X X X X X STOP sign, some other gadgetry, and a couple of embedded X windows. If you click with the right mouse button and drag from X left to right across the menu bar, you'll see the various program X menus which control MRBackup's operation. X X X Pathname Specifications Window X X The Pathname Specifications window is where you tell X MRBackup where data is coming from and going to. It is important X to note that the meanings of "Home Path" and "Backup Path" remain X the same for a backup or a restore operation. That is, the "Home X Path" always refers to the files' normal "home" and "Backup Path" X always refers to the location where the copies are kept. X X The "Listing Path" refers to the destination of a detailed X listing of the contents of the backup floppies and may specify X the printer (PRT:, default) or a file on the hard disk. The X listing is an option which may be enabled/disabled via a Flags X menu selection. X X The "Exclude Path", if specified, is the name of a file X which contains lines describing files which should not be backed X up. Any filename matching an entry in this list will be excluded X from the backup. The exclude file consists of file X specifications, one per line, or comments (a line with a number X sign - # - in column 1). Blank lines are ignored. Also, the X specifications are case-insensitive. That is, "SYSTEM" and X "system" are equivalent. Examples: X X # Exclude all object files X *.o X # Exclude all files beginning with "System": X system* X # Exclude all ".info" files: X *.info X # Exclude the "include" directory and all subdirectories: X include X X You can customize the operation of MRBackup through the use X of an initialization file. This file must be named X S:MRBackup.init. With it, you may set your desired defaults and X Flags. Each line in the file consists of an option setting, of X the form: X X OPTION = VALUE X X or a comment. Comment lines begin with a number sign (#). A X sample initialization file is included which illustrates the use X of all possible parameter settings. X X The following example is from a working MRBackup initialization X file: X X^L X X X X X # The home path is the name of the hard disk. X home = DH0: X # The backup path is the external floppy disk. X backup = DF1: X # Send the listing to a file on the hard disk. X # The default is PRT: X list = S:MRBackup.list X # Give the name of the file containing exclusion specifications. X exclude = S:MRBackup.xcld X # Employ file compression / decompression. X compression = YES X # Disable the listing capability. X listing = NO X # Let MRBackup talk to me. X speech = YES X # Format each floppy targetted for output. X format = YES X # Do special processing for "big files". X bigfiles = YES X # Provide special handling of the "archive bit". X archivebits = YES X X X Backing Up a Disk X X To back up your hard disk, or a section of it, first get an X indication of the size of the area with the Info command, "ls" X (if you have it), List, etc. If you multiply the total number of X bytes (blocks * 512) by 0.65, then divide by 800000, you should X get a very rough estimate (probably high) of the number of floppy X disks required to back up that area. The floppies selected for X backup need not be preformatted, as MRBackup will format them as X needed. You should be sure, however, that no valuable data exists X on them since it will be destroyed by the formatting process, if X formatting is enabled. X X Once your floppies are ready and stacked neatly within reach X (get some labels and your favorite marker pen, too!), the fun X begins. First, modify the pathname specifications according to X your requirements. Normally, the "Home Path" would be the device X name of your hard disk or a directory on it (e.g. DH0:) while the X "Backup Path" would specify the device name of one of your X floppy drives (e.g. DF0:). While earlier versions of MRBackup X were pretty rigid in this regard, this version will allow you to X specify ANY disk device name in either specification. PLEASE BE X CAREFUL! Many users asked for this increased flexibility. Just X be aware that it carries with it an increased risk that you now X have more "opportunity" to burn yourself with improper pathname X specifications. X X Finally, the listing path may be set to the printer device X (PRT:) or to the name of a file on a hard drive or any available X floppy drive not being used by the backup. The listing path will X^L X X X X X be ignored if you disable the Generate Listing option in the X Flags menu. X X Make sure that you have set the desired options in the Flags X menu, then select Backup from the Project menu. You will be X prompted with a date requester. The default date value that X appears is one day earlier than the current date. If that is X satisfactory, simply depress the RETURN key and the backup will X commence. If you desire to change the date, edit the date value X as necessary, using the standard Amiga conventions. Remember that X to clear the gadget you may press right-Amiga-x. A null date X value (all blanks) is allowed, should you want to backup all X files in the home path, regardless of their creation dates. The X minimum date value handled by this date requester is 03/01/84 X (though AmigaDOS supports dates back to 01/01/78). The required X date and time format is MM/DD/YY HH:MM:SS (24 hour clock), the X time specification being optional. You will notice upward and X downward pointing "arrows" above each date component. Clicking on X the appropriate arrow will increment or decrement the respective X portion of the date. Though the values normally will wrap around, X not affecting adjacent date components, certain situations will X arise where incrementing a day value may cause the month to X increment (incrementing February 28 in a non-leap-year will yield X March 31). X X Once the date has been entered, the rest is fairly X automatic. You will be prompted immediately for a floppy disk. X Insert it into the floppy drive that you specified in the backup X path and the disk requester will be satisfied. Should you want to X abort, simply hit the CANCEL gadget in the requester. Also, you X may abort the backup process at any time by hitting the STOP X gadget which appears in the top left area of the screen. This X gadget is checked prior to each block write operation, so be X patient if it does not respond immediately. Use the STOP gadget X with caution - it really lives up to its name! X X As each floppy disk is filled, you should promptly label it. X If formatting is enabled, MRBackup automatically generates volume X names of the form: X X Backup MM-DD-YY. X X Also to be noted is the fact that the files on the backup media X retain the creation/modification date, comments (FileNotes) and X protection bits of their counterparts on the home device. X X You will find that the Amiga's multitasking environment X shines when using this program. For those long-haul backups, get X everything started, then shove MRBackup's screen to the back and X go start something useful. MRBackup will carry on without your X watchful eye. When it needs a disk, the disk requester will pop X out in front of everything and MRBackup will ask (out loud, if X speech is enabled ) for another disk. Having something else to do X will make the time pass faster. X^L X X X X X X X Restoring the Backups X X No, this isn't always the bad part. Backup and restore can X also be useful when your hard disk is crowded and you have to X "juggle" data around. The restoration process is quite similar, X mechanically, to the backup process - it's just reversed. In X addition, the meanings of the pathname specifications are altered X somewhat. The "Home path" describes the destination for the X restored files and, as with the backup process, may specify the X hard drive only or a directory specification. The "Backup path" X describes the file or files to be restored and thus may be X defined down to the file level (1 file). X X Note that on a restore operation, the file creation date of X the backup file is compared to its matching file (if it exists) X on the home device. If the file on the home device is newer, the X file will not be replaced. If this is desired, the file on the X home device must be deleted first. A later version of this X program will probably offer a "force" or "force with prompt" X option. X X X Menus X X This section provides a brief description of MRBackup's X menus and their items. X X Operations Menu X X The Operations Menu provides access to MRBackup's major X processing functions. They are: X X About X This item gives a quick description of MRBackup's X features and lists my address and phone numbers. X X Backup X This command begins the backup process. You should X first be sure that all Pathname Specifications and Flags X menu settings are correct. X X Resume Backup X This command allows you to backup your hard disk in X stages or recover from an interruption, such as a power X failure. Prior to "starting" each backup floppy, MRBackup X writes information about its current internal state to a X file named S:MRBackup.context. The first line of this file X is the disk sequence number (1..n). The second line is the X name of the first file to be written to the floppy. The X third line is the backup "delta date". Subsequent lines are X the names of files and directories in MRBackup's top-level X file list. As long as the file specified in line 2 can be X^L X X X X X found, MRBackup should be able to resume your backup, even X if changes have occurred since the original backup was X interrupted. You may even edit the context file for special X situations where you wish to backup a disjoint set of X directories. X X Restore X Restore allows you to recover files from backup X floppies previously created with the Backup or Resume Backup X commands. MRBackup will prompt you for floppy disks as they X are needed. Note that there is no prescribed order for X restoring floppy disks. X X Load Preferences X This command reads your Pathname Specifications and X Flag menu settings from a file named S:MRBackup.init. You X would typically use this command to restore MRBackup's X settings to your startup settings. X X Save Preferences X This command writes the current Pathname Specifications X and Flag menu settings to the file S:MRBackup.init. This X allows you to establish MRBackup's default initialization X parameters. X X Quit X Alas - all good things must come to an end. As much fun X as MRBackup is to use, you'll probably want to put it away X once in a while. X X X Flags Menu X X The Flags menu allows you to set or clear certain X operating parameters (flags) which constrain MRBackup's X operation. A flag is considered "set" if there is a X checkmark to the left of its name in the Flags menu. Each X time the item is selected it will toggle to the opposite of X its current state. X X Compress Files X This option, when set, allows files to be compressed X during backup and decompressed when restoring. File X compression can typically save from 35% to 60% of the X original file size. Though this is more costly in terms of X time, fewer floppies will be required to perform a backup. X X Do Big Files X Big files are files whose size exceeds the formatted X capacity of a floppy diskette (1756 blocks). In order to X backup big files, MRBackup must split them across two or X more diskettes. In order to accomplish this, a special X information file, MRBackup.bigfile, is written to each X backup diskette containing a big file. MRBackup also X^L X X X X X requires another flag, Format Destination, to be set in X order for big file backup to be attempted. If these X conditions are not met, MRBackup will simply skip over the X big file, reporting the event. X X Generate Listing X This option causes MRBackup to list the contents of X each backup diskette (created by the Backup command) to the X file or device specified by the Listing Path in the Pathname X Specifications window. X X Speak X Setting the Speak flag allows MRBackup to talk to you. X This is especially useful when doing backups. When a new X floppy disk is required, MRBackup will call you for help X (it's a pity the Amiga doesn't have a diskette jukebox X feature). X X Format Destination X This flag is normally set and tells MRBackup to format X each floppy used for backup purposes. However, you may wish X to disable this feature for special backups which you prefer X to "refresh" by writing over previous versions of backed up X files. X X Use Archive Bits X A new feature, added with release 1.2 of the WorkBench, X is an archive bit in each file's protection word. This bit X is cleared whenever a file is modified and can be set by X MRBackup when a file is backed up. When this option is X enabled, files for which the archive bit is set will not be X backed up. This gives you a very accurate method for backup X selection if you're careful with your backup diskette X library. X X X Windows Menu X The Windows menu allows you to reactivate windows which have X been closed. Currently, the only window supported in this manner X is the Pathname Specification window, which you may close once X all pathname specifications have been made. X X X Warranties and Support X X There are no warranties, either expressed or implied, with X regard to the use of this program. You didn't pay for it (did X you?), so how's you gonna' get you money back (sic, sic, sic)? X Seriously, folk, I've tested this beastie pretty thoroughly (I X USE it!), but you know how things go. There may be a bugaboo or X two lurking about. Please exercise it a little before committing X your life (your precious data) to its care. X X^L X X X X X As for support, I will do my best to respond to bug reports X for as long as I have an Amiga in working condition. I will only X support the most recent version, so please know your version X number if you call. I am a fairly trusting sort, so if your need X is urgent and I have a spare floppy, I'll probably respond right X away and assume you'll return my floppy and a couple of stamps in X equally prompt fashion. X X Several people have suggested that I should have made this a X shareware product, if not a commercial one. I don't really think X that shareware works, and it really was not my intention to make X money with this program. I can see in retrospect, however, that X there was a need for such a utility and that with a little more X work (OK, a lot of work!), I could probably have had a minor X financial success. However, by my standards, that would have X required a lot more effort and commitment than I had to give at X the time. Your calls and letters have been extremely gratifying X and all the incentive I've needed to continue to steal a couple X hours here and there to continue making improvements. (If anyone X wants to talk a deal for some reasonably priced custom software, X I'm all ears.) X X X Permissions X X This program is contributed to the public domain, as a token X of gratitude for the many wonderful programs I have received X through the same channels. Feel free to enhance, destroy, sell, X distribute or otherwise benefit from the legal use of this X program. I would love to hear from those of you who find MRBackup X either useful or useless (with specific criticisms in the latter X case). If you make any enhancements (there's room for PLENTY), X please share them with me and the rest of the world. I can be X reached as: X X mrr@amanpt1.ZONE1.COM X ...rayssd!galaxia!amanpt1!mrr X X or X X Mark R. Rinfret X 348 Indian Avenue X Portsmouth, RI 02871 X 401-846-7639 (home) X 401-849-8900 (work) X X X Changes X X This section lists changes, in reverse chronological order, X as they have appeared in subsequent releases of MRBackup. I have X attempted to be thorough, but may have missed a few key items. X X Version 2.1 X^L X X X X X X Added the "archive bits" capability. X X Fixed an error in the file exclusion list processing X algorithm. While this problem seems to have drawn little X attention, the previous algorithm did not properly handle file X specifications involving nested directory components. X X File comments and protection bits now are saved/restored X along with the file date. X X A new command, Resume Backup, plus a new method for saving X "context" information, has been implemented. X X X Version 2.0 X X New User Interface X X MRBackup has undergone a major facelift. It now has its own X screen and color palette and newly designed menus and gadgetry. X All of this is due to my use of PowerWindows 2.0 from X Inovatronics, a very worthwhile tool for Intuition programming. X X You will notice some new gadgetry on the screen. I've added X a "fuel gauge" which indicates the "fullness" of the output X floppy. There's a new error count gadget which tracks total X errors encountered and a "Current Backup Volume Name" gadget X which keeps you informed as to which disk you're currently X archiving to or restoring from. X X The Pathname Specifications window has a close box which X will make the window go away. A new menu, Windows, has an item X Pathnames which will reopen the window for you. X X A new command, Save Preferences, allows you to save your X current pathname specs and flags to the preferences file X (S:MRBackup.init). The Flags menu has been totally redone. This X menu previously consisted of item pairs (/No - X pretty dumb, I must admit - I think I was intrigued by mutual X exclusion at the time). The new Flags menu just consists of X check-marked items. If an item is checked, the feature is X enabled. X X X Improved Error Handling X X This is usually the hardest task in any programming chore X and usually gets the least attention. Previous versions of X MRBackup were no exception. Version 2.0, however, has come a long X way in this direction, especially in the area of recoverability. X A new requester has been introduced which lists your recovery (or X abort) options when certain errors have been detected. Most X significantly, new context-saving code has been added which will X^L X X X X X allow you to restart a backup disk from its beginning, should a X non-recoverable output error occur. Currently, this context X information is saved in memory. I would like to save it to a file X on the system disk. This, coupled with X a new command (Resume Backup), would allow recovery even from a X power failure. X X X Increased Flexibility X X Previous versions of MRBackup were fairly rigid with regard X to home and backup path specifications. Version 2.0 allows ANY X disk device to be referenced in either location. On systems with X dual floppy disks, you can even backup from floppy to floppy! X X MRBackup now allows you to suppress formatting of the backup X disk. This allows you to "freshen" a previously created backup X set. Though this option should be used with care, it does speed X things up and enhances MRBackup's partial backup capability. X X X Big File Handling X X This is truly a last-minute item! I personally don't have a X file big enough to require this, so I didn't address the problem. X However, enough users have requested this that I took a stab at X it. "Big" files, according to MRBackup, are files which are X larger than the formatted capacity of the output media. Iff (sic) X you enable the "Do Big Files" and "Format Destination" Flag X menu items, MRBackup will split X big files across multiple floppy disks. If these options are not X enabled, MRBackup will just complain that the file is too big to X back up and go on. X X Some of you will probably think that the method used to do X this is somewhat kludgy, but it's consistent with my approach to X total AmigaDOS compatibility. When backing up a big file, a X special information file, MRBackup.bigfile, is written to the X output disk. The information file contains stuff like the file X name, the "chunk number" (which piece of the file is this?), the X chunk size, and a flag which indicates whether this is the last X chunk. This information is used by the restore operation to X insure that the file chunks get reassembled in the correct order. X X In order to test this, I had to write a program to create a X big file (slightly larger than 1 floppy disk), archive it and X restore it, then compare the two files. To do all this, I had to X first clean house on my 20 MB hard drive! The big file backup X appears to work OK. I think it could use some more testing, X however, and would encourage you to test drive it before you X commit to it. X X X ________This_Is_The_END________ if test `wc -l < MRBackup.TXT` -ne 616; then echo 'shar: MRBackup.TXT was damaged during transit (should have been 616 bytes)' fi fi ; : end of overwriting check echo 'x - MRBackup.init' if test -f MRBackup.init; then echo 'shar: not overwriting MRBackup.init'; else sed 's/^X//' << '________This_Is_The_END________' > MRBackup.init Xhome = DH0: Xbackup = DF1: Xlist = s:MRBackup.list2 Xexclude = S:MRBackup.xcld Xcompression = YES Xlisting = YES Xspeech = YES Xformat = YES Xbigfiles = YES Xarchivebits = YES ________This_Is_The_END________ if test `wc -l < MRBackup.init` -ne 10; then echo 'shar: MRBackup.init was damaged during transit (should have been 10 bytes)' fi fi ; : end of overwriting check echo 'x - MRBackup.xcld' if test -f MRBackup.xcld; then echo 'shar: not overwriting MRBackup.xcld'; else sed 's/^X//' << '________This_Is_The_END________' > MRBackup.xcld X# The terminating asterisk in some names supresses the ".info" files. XAmigaBasic* Xc Xdevs XEmpty* Xl Xlib Xlibs XPreferences* XSystem* Xt XTrashcan* ________This_Is_The_END________ if test `wc -l < MRBackup.xcld` -ne 12; then echo 'shar: MRBackup.xcld was damaged during transit (should have been 12 bytes)' fi fi ; : end of overwriting check echo 'x - icon.uue' if test -f icon.uue; then echo 'shar: not overwriting icon.uue'; else sed 's/^X//' << '________This_Is_The_END________' > icon.uue Xbegin 644 MRBackup.info XMXQ```0``````U@!Z`%``*P`%``,``0##ES`````````````````````````` XM`````SP``````````````-(```!O``````````````````````!0`"H``@`! XM1!`#``````#_________________________________________```````` XM``!__P_@````````?_\``````````'__``````````!__P``````````?_\` XM````````/'__``````````!_____________________________________ XM______________________[_^__________^__'__________O_@________ XM__[_P'_________^__O_________\!_[__________@_^__________\?_O_ XM_________O_[______________________P'__^`_______\!_^!@/______ XM_`?_@8#_______P'_X&`_______\!_^!@/_______`?_@8#_______P'__^` XM_______\`````/_______`````#_______P`````_______\`````/______ XM_`````#_______P`````_______\`````/_______`````#_______P````` XM____________________________________________________________ XM____________``````````!__P_@````````?_\``````````'__```````` XM``!__P``````````?_\`````````/'__``````````!_________________ XM________________________``````````````````$`!``````````!``X` XM`````````0`?``````````$`/X`````````!``0`````````#^`$```````` XM``?`!``````````#@`0``````````0`$```````````````````````'__^` XM````````!_^!@`````````?_@8`````````'_X&`````````!_^!@``````` XM``?_@8`````````'__^````````````````````````````````````````` XM```````````````````````````````````````````````````````````` XF```````````````````````````````````````````````````` X` Xend ________This_Is_The_END________ if test `wc -l < icon.uue` -ne 24; then echo 'shar: icon.uue was damaged during transit (should have been 24 bytes)' fi fi ; : end of overwriting check exit 0