






                                   HardBack

                                 User's Guide



                                Copyright 1988
                                John Haugeland






    Contents:

        Shareware notice and warranty disclaimer:         2

        Introduction and description of HardBack:         3

        How HardBack differs from BACKUP and XCOPY:       5
    
        Using HardBack:                                   6

        Using HardBack for the first time:               10

        The TRASHCAN system:                             11

        Exempt directories:                              13

        Options (command line switches):                 14

        Using HardBack with other back-up systems:       16

        System requirements:                             17

        Warning and error messages:                      18

        Figures (sample screens):                        21

Shareware Notice:


    The HardBack program and its associated documentation are distributed as
"shareware". That means they are not in the public domain; I retain the
copyright. It also means that you are invited to copy the program and the
documentation without charge, so that you may try Hardback out on your system
to determine whether it meets your needs. But if you keep HardBack and use it
regularly, then you are obliged to register and pay a registration fee.

    I think the registration fee should be $25.00 per copy in regular use; that
strikes me as high enough and low enough to make us both happy. But if your own
financial circumstances (e.g., if you are an impoverished student, or heir to a
fabulous fortune) make it the case that, in your judgement, a different fee
would be appropriate, then I will accept your judgement. It seems to me that
the amount of the registration fee is less important than that you register at
a fee that you deem fair.

    I would also be pleased to receive any comments or suggestions that you
have about HardBack; and i would be interested to know how you learned of and
obtained the program.

    To register HardBack, send your name and address, and a check for your
registration fee to:

                    John Haugeland
                    1005 Winterton Street
                    Pittsburgh, PA  15206

    Institutions interested in site licenses or customized versions of the
program should contact me directly at the above address.

    You should also feel free to distribute copies of HardBack to your friends
and associates, so that they may try it out on the same terms as outlined
above; but the program and documentation must always be distributed together,
and neither may be altered in any way. You may not charge anyone for copies of
HardBack, though user's groups may charge a modest fee for the costs of copying
and handling.



WARRANTY DISCLAIMER:


    HardBack is distributed AS IS, without warranty of any kind, either express
or implied, including but not limited to implied warranties of merchantability
and fitness for a particular purpose. The user of this program or documentation
agrees to hold its author and/or distributor(s) harmless for any direct or
consequential damages for its use or misuse.

Introduction and description of HardBack:


    Has it ever occurred to you that the ideal back-up medium for a hard disk
is a second hard disk? It has to most of us: shuffling floppy disks is just too
tedious for any but the most saintly to endure very often; and tape drives are
not only too slow but too expensive. What's worse, if your hard disk ever does
give you trouble, then you're stuck with a bunch of floppy disks or tapes--ugh!
A second hard disk is cheaper that a tape drive, requires no physical handling
of media, is splendidly fast, and, in the event of trouble, is itself a
perfectly usable work environment.

    However, nothing's quite that easy in real life: you can't just buy another
hard drive, and live happily ever after. Three difficulties stand in the way:

    1)  You don't want to back up files that have already been backed up,
        because that just wastes time copying; but selective back up based on
        dates, times, archive bits, and/or specified directories requires
        thought and planning, and is (therefore) annoying and error prone.
    
    2)  You want your back-up disk to have the same directory structure, with
        files in the same places, as on your main drive (so you can find things
        if you need them); but if you do file management on your main disk--
        rearranging directories and moving files around--you don't want to have
        to do the same thing to your back-up disk by hand, nor do you want to
        recopy all those files that have simply been moved around.
    
    3)  Finally, and quite important, as you delete old files from your main
        disk, you don't want to have to remember, find and delete them all
        manually from your back-up disk (nor can you just leave them there,
        because the disk will soon fill up); yet, you also don't want them to
        be lost forever--at least not right away--in case you delete or modify
        a file by accident (back ups should protect you from yourself too).

    HardBack was written to address precisely these issues. It is a hard-disk
back-up program designed specifically for backing up one hard disk onto another
hard disk (or similar device). This approach to back up is much faster and more
convenient than backing up to floppy disks or tape; and it is also cheaper than
tape (because hard disks cost less than tape drives). In a typical situation,
HardBack will give you a fully up to date back up of your entire hard disk in
less than 30 seconds!

    The back-up drive is maintained by HardBack in a condition exactly like
that of the source drive (with certain specific exceptions, explained below).
That means that all the files and programs are maintained in their standard
format, and are completely accessible and usable as they stand; you never have
to "restore" anything backed up by HardBack. What's more, the directory
structure on the back-up drive is kept exactly the same as that on the source
drive; if you rearrange or rename subdirectories or move files on the source
drive, HardBack will rearrange everything on the back-up drive to match. And,
of course, all names, dates, times, and so on, of files and subdirectories are
kept just the same. As a result, if your main hard disk ever gives you trouble,
simply disconnect it, and you are completely ready to go with a hard disk
system already set up and arranged in just the way you like it.

    It should be apparent from this description that HardBack will only work
with two hard disks, or similar devices. To be "similar," a device must (1) use
the MS-DOS/PC-DOS disk format, (2) support high speed random access, and (3)
have a large enough capacity to support the entire back up on a single medium.
So removable media that are as large and fast as hard disks work just fine (mix
or match); but tapes (no fast random access) and ordinary floppy disks (too
small) do not work with HardBack. Note that HardBack works with "logical" disks
not physical disks, so you can back up from one partition to another on the
same physical drive; and if you have multiple partitions to back up (e.g., from
60mb drive to another), then you must run HardBack separately for each.

    Here are the respects in which the back up maintained by HardBack is not
quite an exact duplicate of what's on the source drive:

  1) To the extent that there is space available on the back-up drive, HardBack
     will maintain a special directory (not found on the source drive)
     containing recently "deleted" files--so that you can easily get them back.
     (See the section on "The TRASHCAN system" later in this Guide.)
  
  2) Any number of subdirectories on either the source or the back-up drive, or
     both, can be explicitly marked by the user to be ignored by HardBack. (See
     the section on "Exempt directories" later in this Guide.)
  
  3) HardBack does not insist that the "archive" bit in the attribute byte be
     the same on the source and back-up drive. This is for compatibility with
     other back-up systems (See the section on "Using HardBack with other
     back-up systems" later in this Guide.)
  
  4) Files that have the "system" bit set in their attribute byte are ignored
     by HardBack. Normally, the only files in this category will be the two
     hidden DOS system files in the root directory, and certain copy-protected
     programs.
  
  5) Entries will not in general be listed in the same order within
     subdirectories on the two drives. Also, files will not be stored in the
     same physical disk sectors on the two drives. The latter means that the
     back-up copies of certain copy-protected programs will not work properly
     (the copies on the source drive are not affected).

How HardBack differs from BACKUP and XCOPY:


    The BACKUP and XCOPY commands that are supplied with DOS (XCOPY only with
versions 3.2x and later) have some capabilities that HardBack lacks. Most of
these differences derive from the fact that HardBack always works with entire
(logical) drives. Accordingly, HardBack does not accept path, directory, or
file specifications on the command line, either explicitly or with wild cards,
nor does HardBack ever confine itself only to the current directories.
Likewise, Hardback never pays any attention to the "archive" attribute of a
file, nor does it ever restrict its searches to specified date or time periods.
Rather, HardBack determines which files need to be backed up by comparing
complete directory entries (for each file on both drives), and then
automatically backs up all and only those files that need to be backed up.
Finally, HardBack only works if a single target medium is large enough to
receive the entire back-up; it will not split files or directories over
multiple media (such as multiple floppy disks).

    On the other hand, Hardback has important capabilities that BACKUP, XCOPY,
and many other back-up programs lack:

    1.  Most important, HardBack searches the target medium first, and only
        copies those files that need to be copied; that is, HardBack will not
        copy a file if it is already located in the proper place on the back-up
        disk, or if it can be moved to the proper place. This is the main
        secret of HardBack's amazing speed.
    
    2.  Almost as important, HardBack removes outdated files and directories
        from the backup disk; otherwise, your back-up disk would quickly
        overflow with files and directories and files that you no longer want,
        forcing you to delete them manually.
    
    3.  But, since sometimes we make mistakes, and delete or modify something
        that we wish we hadn't, HardBack also saves--in its TRASHCAN--all
        discarded files from the nine most recent back-up sessions (or as many
        as the disk has room for).
    
    4.  The back-up copies made by HardBack are ordinary readable/executable
        DOS files; no special "restore" procedure is needed to use them.
    
    5.  HardBack back-ups files regardless of their read or write protection or
        hidden status (the back-ups will have the same status); but HardBack
        ignores files with the "system" attribute bit set.
    
    6.  HardBack is not limited to 63-character path lengths, and will not be
        bothered if APPEND is in effect (it will be ignored).

Using HardBack:


    You invoke HardBack just as you do any other program. That is, it must be
located either in the current directory on the current drive, or in some
directory on the current path. To invoke the program, type its name, HARDBACK,
followed by the <Enter> or <Return> key. You can also set certain options on
HardBack by typing special characters after the name and before the <Enter> key
(see the section on "Options" later in this Guide). If you like, you can use
the DOS "Rename" command to change the name of HardBack to something more
convenient (like: HB); but you must leave the file extension the same (.EXE).

    Once the program loads, it will display the main screen, showing six
choices in the "command window" (see Figure 1). You make a choice by pressing
the key or key combination shown at the left of the screen. The choices are as
follows:

    <F1>  The <F1> function key calls up HardBack's online HELP facility,
          giving brief descriptions of the program's functions and options. You
          can see more HELP by pressing the <F1> key again; to return to the
          main screen, press the <Esc> key.
 
    <F2>  HardBack will operate in either of two modes, called PREVIEW and
          BACKUP, respectively. The <F2> key toggles back and forth between the
          two modes; the current mode setting is shown at the right of the
          window. In PREVIEW mode, HardBack examines the two drives, and
          reports any discrepancies between them. That is, it reports the
          changes that it would make to the back-up drive if it were in BACKUP
          mode; but it does not actually make any changes. (HardBack's reports
          are explained later in this section.) BACKUP mode is just the same,
          except that HardBack actually makes the needed changes to the back-up
          drive--that is, it actually does the back up.
 
    <F3>  By default, drive C: is the source drive; but the <F3> key gives you
          the opportunity to change which drive is the source drive. When you
          press <F3>, HardBack warns you that you are about to change the
          source drive (see Figure 2); you may then press the letter of the
          drive that you wish to be the source drive, or press the <Esc> key
          (which cancels the operation and changes nothing). If you make a
          mistake, simply press the <F3> key again and enter the correct drive
          letter. The drive currently selected is shown at the right of the
          window. (Note: the default setting for the source drive can also be
          changed with a command line switch; see the section on "Options"
          later in this Guide.)
 
    <F4>  By default, drive D: is the back-up drive; but the <F4> key gives you
          the opportunity to change that, just as with the source drive and the
          <F3> key above.
 
 <Ctrl>C  If at any time you want to stop HardBack before it is finished, you
          can do so by holding down the <Ctrl> key and pressing the letter C.
          This is perfectly safe at any time. If HardBack is in the middle of
          creating a directory, copying a file, or some other sensitive
          operation, it will finish that operation first, and then quit--giving
          you a full report of whatever it has already accomplished. If you
          terminate a back-up session in the middle, and then start another,
          the second will pick up (approximately) where the first left off.
 
 <Enter>  After you have made all your selections, you begin the operation
          (PREVIEW or BACKUP, as the case may be), by pressing the <Enter> key.
          HardBack will then run to completion (unless you press <Ctrl>C),
          giving a running report of everything that it is doing, as well as
          the elapsed time. A descriptive error report will be posted at the
          end, if any errors were encountered.

    As HardBack runs, it provides a summary report of its actions in the
"report window," just below the command window on the main screen (see Figures
3 and 4). The information reported is as follows:

   On the SOURCE drive:
   
      Directories scoured: This is the number of directories on the source
         drive examined by HardBack, to ensure that they are matched on the
         backup drive. This includes the root directory, but it does not
         include any exempt directories (or any subdirectories within them),
         nor would it include the TRASHCAN directory (if there should happen to
         be one on the source drive).
      
      Files cross-checked: This is the number of files on the source drive that
         HardBack has checked to ensure that they are matched on the back-up
         drive. It does not include any files with the "system" attribute bit
         set, nor any files in any directories that are not examined.


   On the BACKUP drive:
   
      Directories removed: If there are any directories on the backup drive
         (aside from exempt and TRASHCAN directories) that are not exactly
         matched on the source drive, HardBack will remove them. This is the
         number of directories so removed. Note: HardBack will regard any
         discrepancies in the directory structure as a failure to match; so, if
         you move directories around on the source drive, or rename them,
         HardBack will remove all the non-corresponding directories (and their
         subdirectories) from the back-up drive, and then create new ones to
         match the source. However, in general, Hardback will not have to
         recopy all the files that were in those directories; rather, it will
         simply transfer the existing copies to the new directories that it
         creates--which is very fast.
      
      Directories created: Similarly, if there are any directories on the
         source drive (aside from exempt and TRASHCAN directories) that are not
         exactly matched on the back-up drive, HardBack will create matches for
         them on the back-up drive. This is the number of directories so
         created.
      
      Files displaced: This is the number of files found on the back-up drive
         that did not match corresponding files on the source drive, either as
         to which files they are, or as to location in the directory structure.
         HardBack does not actually compare the contents of the files; rather
         it compares the directory entries for those files. Two files will be
         deemed the same by HardBack if they have the same name, the same
         extension, the same date of creation, the same time of creation (to
         the nearest two seconds), the same size (to the nearest byte), and the
         same attributes (except for the archive bit). The chances that
         different files will be incorrectly deemed the same by this test are
         extremely low. There are three things that can happen to a file that
         is displaced:
         
         Files moved: If a displaced file is needed in some other directory,
            either already existing or newly created, HardBack will move it
            there. This is the number of files so moved.
         
         Files trashed: If a displaced file is no longer needed anywhere on the
            back-up drive (for instance, because it has been deleted from the
            source drive), then it will be transferred to a new TRASHBAG
            directory (except for certain special cases, which are "dumped").
            This is the number of files so "trashed". For more information, see
            the section on "The TRASHCAN system" later in this Guide.
         
         Files dumped: In certain special cases, a file that is no longer
            needed on the back-up drive will not be transferred to the TRASHBAG
            directory, but simply deleted. This is the number of files so
            "dumped". There are three conditions under which a file will be
            dumped. (1) If two or more files with the same name and extension
            are no longer needed, HardBack will transfer only one of them to
            the TRASHBAG; the others will be dumped. (2) If the back-up drive
            is full, so that there is not enough room to trash (ie, save in a
            TRASHBAG) all the files no longer needed, then as many as will not
            fit are dumped. (3) If you radically rearrange your source drive
            all at once, then it is (remotely) possible to overload HardBack's
            internal buffer for keeping track of moved files. If that happens,
            any files that HardBack cannot keep track of will be dumped.
            Hardback can keep track of 768 displaced files at one time (whether
            to be moved or trashed); but, even if this buffer does overflow,
            the backup will be completed correctly--it will just take longer.

      Files replaced: If a file on the source drive is not matched in the same
         location on the back-up drive, then HardBack will match it. There are
         two ways in which a file can be matched:

         Files moved: If a needed file is already on the backup drive, but in
            some other location where it is no longer needed, then HardBack
            will simply move it to the new location where it is needed. This is
            the number of files so moved. (Note: the number of files that are
            re-placed by moving is exactly the same as the number of files that
            are displaced by moving).
         
         Files copied: If a needed file cannot be supplied by moving it from
            some other location on the back-up drive (for instance, because it
            is a brand new file), then a new copy will be made from the source
            drive to the back-up drive. This is the number of files so copied.
            The total number of bytes copied, rounded up to the nearest K
            (kilobyte), is also reported. Note: this number is computed by
            counting the number of disk sectors actually occupied by the copied
            files; so it is not the same as the sum of the file sizes, as
            recorded in the directory entries (because they're computed in
            bytes), nor is it the amount of disk space used up, as reported by
            CHKDSK (because that's in "allocation units"--larger than sectors).
         
    In PREVIEW mode, HardBack cannot determine which displaced files will be
moved, trashed, or dumped; nor can it determine which re-placed files will be
moved or copied. So these numbers are not reported. After a preview is
completed, HardBack will offer you the option of doing a back up (with the same
settings). If you want to do a back up, type Y or y; otherwise, any other key
exits.

    If an error is encountered at any time during a preview or back up,
Hardback will clean up after itself as well as possible, and provide an
explanatory error message in the "message window," directly under the report
window on the main screen. For a complete list of HardBack's error messages,
see the section on "Warning and error messages" later in this Guide.

Using HardBack for the first time:


    Before HardBack can be used, both drives must be installed, partitioned, 
and properly formatted. If one (or both) of the drives is (are) new, be sure to
format it (them) with the "/S" option on the format command, so that the DOS
"system" files will be copied to their special disk locations. HardBack will
not copy (or alter) these files; and you cannot boot your system from any disk
that does not have them properly in place. You should put the system files even
on the drive that you plan to use for back up, since, if your main drive ever
gives you trouble, you will want to be able to boot from your back-up drive.
For more information on partitioning and formatting, consult your DOS
documentation.

    If one of your hard disks is new, and the other not, then you will want to
copy all your existing files and directories from your old drive to your new
one. Naturally, HardBack will do this job for you. However, it will not be
nearly as fast as your regular backups will be, once the system is in use.
HardBack achieves its remarkable speed by carefully copying only those files
that actually need to be copied in each back-up session. Since, normally, most
of what's on your disk will already have been backed up, HardBack will only
have to copy a small fraction of the disk's total contents (just the files that
are new).

    However, when you are backing up for the first time to a fresh disk,
everything will have to be copied--and that takes time. How much time it takes
depends on how fast your drives are, and how much has to be copied; but 20 or
even 30 minutes would not be unusual. (Later, you should be able to do routine
back ups in 20 or 30 seconds. What a difference!)

    If you have been using two hard disks for some time, be sure that
everything that you want to keep is on one of them; and then use HardBack to
copy everything from that drive to the other. If many of the files that you
will be keeping are also already on the second drive (regardless of what
directories they're in), HardBack will not recopy them, but simply move them to
the directories where they belong; this can result in a considerable savings in
time.

    IMPORTANT: When you are making this first back up, be sure to set the
source drive (in the command window on HardBack's main screen) to be the drive
that has everything you want to keep, and the back-up drive to be the drive
that is empty (or incomplete). Do it this way the first time, even if hereafter
you intend to use the latter drive (perhaps your brand new one) as your main
drive.

    Incidentally, whenever you use HardBack to copy the entire contents of an
existing drive to a brand new (or freshly formatted) drive, then the
arrangement of files on the new drive will be "optimized" in the sense that:
(1) in each directory, all the subdirectories will be listed first, followed by
the files; and (2) every file and subdirectory will be stored in contiguous
sectors on the disk (there will be no "file fragmentation").

The TRASHCAN system:


    HardBack not only copies new files from your source drive to your back-up
drive, but also removes old files from the back-up drive, when they no longer
exist on the source drive. This is necessary, of course, because otherwise the
backup drive would quickly fill up with outdated files.

    However, every once in a while, you wish you could recover an old file.
Sometimes, you delete a file by accident; other times you write a new version
of something, and then find you need to refer to the old version; or perhaps
you decide you like the old version better after all. If HardBack simply
deleted files from the back-up drive every time you deleted them from the
source drive, then these old versions would be lost. So, instead of throwing
things away immediately, HardBack saves them for a while, in a place from which
you can easily get them back, if you change your mind.

    More specifically, HardBack maintains a special subdirectory in the root
directory of the back-up drive called TRASHCAN. Within this subdirectory, it
then maintains as many as nine further subdirectories named TRASHBAG.1 through
TRASHBAG.9. These latter subdirectories contain the "trashed" files from the
nine most recent back-up sessions that resulted in any. ("Trashed" files are
files that were removed from the regular back-up directories, because they no
longer exist on the source drive; that is, they are the outdated files that
HardBack is temporarily saving.)

    TRASHBAG.1 contains the most recently trashed files; TRASHBAG.2 contains
those from the preceding session; and so on, down to TRASHBAG.9, which contains
the oldest trashed files that HardBack is still saving. When a new backup
session results in freshly trashed files, a new TRASHBAG.1 subdirectory is
created, and the numbers of the others are incremented. The contents of the old
TRASHBAG.9 are finally deleted for real, and that directory is removed.

    The files in these TRASHBAG subdirectories are as accessible, usable and
copyable as are the files in any other subdirectories on the disk. In other
words, assuming you back up every day (and, of course, backing up with HardBack
is so painless that you will back up every day), you have a nine day "grace
period" between the time when you delete a file from your source drive and the
time when it's really gone.

    One difficulty will occasionally cloud this pretty story: a full back-up
drive. If your back-up drive is not large enough to hold copies of everything
that's on your source drive, as well as all the trashed files from the nine
most recent sessions, then something's got to give. HardBack will eliminate the
oldest TRASHBAG first (ie, TRASHBAG.9); and, if necessary, it will continue
removing TRASHBAGs, oldest first, until none of the previous TRASHBAGs remain.
If there is still not enough room, then HardBack will "dump" files, one at a
time, from the trash list of the current back-up session. If even this is not
sufficient, then the back-up drive is too small to back up the source drive,
and HardBack will report an error.

    WARNING: you should not add files or subdirectories to the TRASHCAN, nor
rename any of the TRASHBAGs in any way except to change the digit (if you do,
HardBack will eliminate the alien intruders). However, it is perfectly okay to
remove and/or renumber TRASHBAGs, and to alter their contents in any way
(including adding subdirectories)--if, for some reason, you want to.

Exempt directories:


    In some cases, you may want HardBack to ignore part of your source disk, or
part of your back-up disk, or both. For instance, you may have copy protected
programs on your source disk that it's useless to back up, because the back ups
wouldn't work anyway; or, you may have bulky program or data files that needn't
be backed up because you have them on floppies already (perhaps the original
distribution disks); or maybe one of your hard disks is larger than the other,
and you want to use the extra space for files that are of occasional interest,
but needn't be backed up regularly.

    Whatever the reason, HardBack provides a facility for this purpose: any
subdirectory in the root directory of either drive that has the extension
".!HB" will be completely ignored by HardBack. That means: if it is on the
source drive, it and its contents will not be copied to the back-up drive; and,
if it is on the back-up drive, it will not be removed, nor its contents
trashed. Such directories are called "exempt directories". Note: to be exempt,
a subdirectory must be in the root directory of the respective drive, and its
extension must be ".!HB"; other than this, there are no restrictions.

    For example, your source drive might have a subdirectory in its root
directory named "123_PROG.!HB", containing the executable and driver files for
your spreadsheet program; then HardBack would not bother to copy them to the
back-up drive. Of course, the worksheets produced by the spreadsheet program
should not be in this subdirectory (or any other subdirectory contained within
it), because those you do want to back up regularly.

Options (command line switches):


    HardBack allows several options to be set from the command line, when the
program is invoked. They are set by including a specific character on the
command line, after the program name is typed, but before the <Enter> or
<Return> key is pressed. As many as seven switch characters may be included on
the command line. There must be one or more spaces following the program name
and before the switch characters; but the switch characters themselves must be
in one contiguous group, with no spaces or other delimiters between them. It
does not matter what order the switch characters appear in, except that if
letters are used to reset the default drives, the first letter to appear will
set the source drive, and the second letter to appear will set the back-up
drive.

            Examples:

                HARDBACK !@#$<Enter>          Okay
                HARDBACK $#@!<Enter>          Okay (same as above)
                HARDBACK!@#$<Enter>           Not okay (need a space)
                HARDBACK ! @ # $<Enter>       Not okay (spaces not allowed)
                HARDBACK !,@,#,$<Enter>       Not okay (commas not allowed)

    The functions of the command line switches are as follows:

  a,b, .. If any letter of the alphabet (upper or lower case) appears among the
          command line switches, then the first such letter to appear will set
          the default source drive. If a second letter appears, it will set the
          default back-up drive.
  
      !   The exclamation point tells HardBack to switch into BACKUP mode, and
          then proceed immediately--that is, without waiting for the operator
          to change any settings in the command window, or press the <Enter>
          key. This might be used, for instance, with a DOS "shell" or keyboard
          macro program that allows you to associate an entire command line or
          batch file with a single key (perhaps a function key). Then you could
          have a customized system in which you back up your hard disk with a
          single keystroke.
  
      @   The at-sign tells HardBack not to use any special graphics characters
          in drawing its screen; in other words, it will draw its boxes
          entirely with the '|', '-', and '+' characters. These aren't as
          pretty as the graphics characters, but they will work on machines
          that don't support the IBM higher order character set.
  
      #   The number-sign is the "save RAM" switch. It tells HardBack to use
          smaller internal buffers; this reduces the maximum directory size
          from 1534 to 766 entries per directory, but it also requires less
          system RAM. (See the section on "System requirements" later in this
          Guide for more information on how much RAM HardBack requires under
          various conditions.)
  
      $   The dollar-sign tells HardBack not to wait for a keystroke at the
          end--that is, to exit to DOS immediately when it is finished.
  
      &   The ampersand tells HardBack to verify (read-after-write) everything
          it writes to the disk. Normally, HardBack verifies all file
          allocation table sectors that it writes, but not directory or file
          sectors; if this option is set, HardBack will verify every sector it
          writes--attempting multiple rewrites, if necessary. Setting this
          option slows HardBack down somewhat. Note: HardBack does its own
          verifying, and does not rely on the DOS verify flag; so this option
          will work with all disk controllers.

    Command line switches can be used to produce a "customized" version of
HardBack. Suppose the configuration of your system were such that you would
like the default source drive to be C:, the default back-up drive to be F:, and
the RAM usage to be minimized. Then you could write a batch file (named
"HB.BAT", perhaps) containing only the following line:

                        HARDBACK CF#

Then you need only type HB<Enter>, to get a version of HardBack running exactly
to your custom specifications.

Using HardBack with other back-up systems:


    When a file is created or modified By DOS, the "archive" bit in the file
attribute byte is set. Certain disk back-up utilities, including the DOS
BACKUP/RESTORE facility, then clear this bit whenever they back up a file; that
way, they can tell, at the next back-up session, which files have already been
backed up, and which are new or modified.

    HardBack does not use this system (because HardBack not only keeps track of
which files are which, but also of which directories they are in). But HardBack
is also careful not to interfere with this system, and likewise not to let this
system interfere with it. When HardBack copies a new file from the source to
the back-up drive, it copies the archive bit exactly as it stands; but
otherwise, HardBack totally ignores the archive bit. HardBack does not insist
that the archive bit be set the same for corresponding files on the source and
back-up disks (this is the only discrepancy that HardBack will allow between
the two); and HardBack never modifies the archive bit of an existing file on
either drive.

    Therefore, HardBack is completely compatible with back-up systems that use
and rely on the archive bit. You can do one back up one way, and the next back
up the other way, as often as you like, and neither one will ever interfere
with the other.

    But, why, you might ask, would you ever want to use another back up system
when you have HardBack? Well, there are several possible reasons. For instance,
your company might require you to make regular (perhaps monthly) back ups to be
stored at another location (perhaps in a vault); HardBack would be no help with
this--unless, of course, you had portable or removable-media hard disks (which
would be ideal). Another possibility is moving: if you were ever to ship your
computer, with both hard disks installed, you would be wise first to back up
everything you really needed onto floppy disks, and ship them separately. For
instance, your computer might get dropped in transit, destroying both hard
disks simultaneously; worse yet, it might get lost or stolen.

    But the point here is not that most people will want to use another back-up
system with HardBack, but only that, if you ever do, you can.

System requirements:


    HardBack requires an IBM PC, XT, AT, PS/2, or compatible computer, running
MS-DOS or PC-DOS, version 2.xx or 3.xx, with two hard disks (or similar
devices), and 173K to 289K of available RAM. HardBack has NOT been designed to
work with DOS 4.xx, OS/2, CPM-86, Wendin DOS, or any other operating system
besides those mentioned above, nor on any LAN or other network.

    HardBack does not use extended or expanded memory. The hard disk devices
need not be of the same type, nor of the same size, nor need they have been
formatted by the same version of DOS. HardBack makes all disk access calls
through DOS; so any device supported by DOS will be supported by HardBack
(provided it is sufficiently large and fast--see the section entitled "General
description of HardBack" earlier in this Guide). Technically speaking, HardBack
works not with physical devices, but logical devices; accordingly, the most it
can back up at one time is one MS-DOS partition--limited therefore to the
MS-DOS maximum size of 32 megabytes. HardBack can handle any size allocation
unit (on either drive); but it only works with standard, 512-byte sectors.

    HardBack works fine with drive "aliases" created with the DOS ASSIGN
command; but it does not work with "artificial" drives created with the JOIN or
SUBST commands (it simply ignores them).

    The amount of available RAM required by HardBack depends on three factors:
(1) How big your hard disks are; (2) which version of DOS was in use when the
disks were partitioned and formatted; and (3) whether the "save RAM" switch
('#') was set on the command line when HardBack was invoked (see the section on
"Options" earlier in this Guide). The actual RAM requirements for a given case
can be estimated from the following table:

                           10 meg     20 meg     30 meg

             DOS 2.xx       237K       237K       241K
             DOS 3.xx       249K       269K       289K

    If the "save ram" switch is set, these numbers are all reduced by 64K.
Note: the version of DOS that matters for this computation is the version that
was in use when the disk was partitioned using the FDISK command. If you want
to change your file allocation table conventions from DOS 2.xx to DOS 3.xx (the
latter is much more space efficient on the disk), you must not only reformat
the drive, but also reassign the DOS partition with the new 3.xx version of
FDISK. If your drives are intermediate in size, or not both the same size, or
not both partitioned under the same version of DOS, you can get a reasonable
estimate by averaging the two relevant values in the table.

Warning and error messages:


    Termination messages are divided into nine categories. Category 1 is for
system problems that prevent HardBack from loading properly; so the main screen
is never displayed, and an error message is simply sent to DOS standard output.
All other termination messages appear in the message window at the bottom of
the screen. Category 0 is normal completion, without error. All other
categories are for errors, arranged more or less in order of increasing
seriousness. Error messages in the message window are two or three lines long.
The first line identifies the category; the second line identifies the specific
error condition; and, where appropriate, the third line identifies the relevant
drive, directory, and/or file. All termination messages are listed below, by
category.



Category 0:  [Normal completion; no errors]

    Finished (no errors).

    PREVIEW completed without error; do you want to do a BACKUP now?
    (If so, type Y; if not, type any other key to exit.)


Category 1:  [System related start up difficulty; main screen doesn't display.]

    1.1: HardBack requires MS-DOS or PC-DOS, versions 2.xx or 3.xx.

    1.2: Can't find program segment prefix; hence can't allocate RAM.


Category 2:  INITIALIZATION ERROR: HardBack unable to get started.

    2.1: All command-line arguments must be in one contiguous group.

    2.2: Illegal (or too many) command-line argument (or arguments).    

    2.3: Unable to read boot record (= sector 0).

    2.4: Disk not formatted by MS-DOS or PC-DOS.

    2.5: Disk sectors are not standard size (= 512 bytes).

    2.6: Insufficient RAM to run HardBack.

    2.7: Unable to load file allocation table into RAM.


Category 3:  Program terminated early by user; no errors.

    3.1: Control-C entered from keyboard.

    3.2: Quit because backup drive too small.

    3.3: Quit because source drive has much less data than backup.


Category 4:  RELATIVELY CLEAN ERROR: FATs, directories, & TRASHCAN okay.

    4.1: Disk read error while loading a directory.

    4.2: Directory is too large to load.

    4.3: Tried to add too many entries to root directory.

    4.4: Backup drive too full to enlarge directory for new entry.

    4.5: Backup directory buffer too full to add new entry.

    4.6: Backup disk too full for new subdirectory.

    4.7: Backup disk too full for copy of next file.

    4.8: Source disk read error while copying file.

    4.9: Backup disk write error while copying file.


Category 5:  MODERATELY MESSY ERROR: TRASHCAN or a TRASHBAG corrupted.

    5.1: Disk write error while initializing new TRASHCAN subdirectory.

    5.2: Disk read error while loading TRASHCAN subdirectory.

    5.3: Disk write error while updating TRASHCAN subdirectory.

    5.4: Disk write error while creating new TRASHBAG.1 subdirectory.

    5.5: Disk read error while removing a TRASHBAG subdirectory.


Category 6:  MODERATELY MESSY ERROR: one subdirectory corrupted.

    6.1: Disk error while (re)writing a directory.


Category 7:  SERIOUSLY MESSY ERROR: one or more FAT sectors corrupted.

    7.1: Disk error writing one or more FAT sectors (first copy).

    7.2: Disk error writing one or more FAT sectors (second copy).

    7.3: Disk error writing one or more FAT sectors (both copies).


Category 9:  INTERNAL ERROR (this is not supposed to be possible).

    9.1: Attempted disk write during preview.

    9.2: Invalid cluster number in fat_off().

    9.3: Get_free_cluster can't find space in FAT.





    HardBack also generates a number of warning messages that do not cause
termination of the program, but instead require some action on the part of the
operator. These messages appear in a special box enclosed within the report
window, and are accompanied by a system "beep"; they are listed below:



    Drive specification error: the source and backup drives are the
    same; but that doesn't make sense (and hence is not allowed).

    
    
    CAUTION:  This command changes which disk drive will be the SOURCE.
       (The source drive is the drive from which backups will be made.)
        --> If you wish TO PROCEED, press the desired drive letter.
        --> If you DO NOT wish to proceed, press the <ESC> key.
    
    
    
    CAUTION:  This command changes which disk drive will be the BACKUP.
       (The backup drive is the drive onto which backups will be put.)
        --> If you wish TO PROCEED, press the desired drive letter.
        --> If you DO NOT wish to proceed, press the <ESC> key.
    
    
    
    CAUTION:  BACKUP seems too small to hold all the data from SOURCE.
    Please make sure the above drive specifications are what you want.
        --> If so, type the letter 'Y' to PROCEED.
        --> If not, press ANY OTHER KEY to QUIT.
    
    
    
    CAUTION:  SOURCE drive presently contains much less than BACKUP.
    Please make sure the above drive specifications are what you want.
        --> If so, type the letter 'Y' to PROCEED.
        --> If not, press ANY OTHER KEY to QUIT. 
 ͻ
          >>>  Welcome to HARDBACK  <<<               Copyright 1988         
          Hard disk to hard disk backup               John Haugeland         
 ͹ 
     <F1>   For HELP with HardBack, press the <F1> function key.              
     <F2>   Choose whether to preview or backup (now set for: PREVIEW).       
     <F3>   Choose a different source drive  (now = C:).                      
     <F4>   Choose a different backup drive  (now = D:).   ͹ 
  <Ctrl>C   To QUIT at any time, press the <Ctrl>C keys.     Elapsed time:   
  <Enter>   When ready to BEGIN, press the <Enter> key.                      
 ͹ 
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
 ͹ 
                                                                              
                                                                              
                                                                              
 ͼ 

Figure 1: HardBack's main screen and command window.


 ͻ 
          >>>  Welcome to HARDBACK  <<<               Copyright 1988         
          Hard disk to hard disk backup               John Haugeland         
 ͹ 
     <F1>   For HELP with HardBack, press the <F1> function key.              
     <F2>   Choose whether to preview or backup (now set for: PREVIEW).       
     <F3>   Choose a different source drive  (now = C:).                      
     <F4>   Choose a different backup drive  (now = D:).   ͹ 
  <Ctrl>C   To QUIT at any time, press the <Ctrl>C keys.     Elapsed time:   
  <Enter>   When ready to BEGIN, press the <Enter> key.                      
 ͹ 
                                                                              
   ͻ   
     CAUTION:  This command changes which disk drive will be the SOURCE.    
        (The source drive is the drive from which backups will be made.)    
         --> If you wish TO PROCEED, press the desired drive letter.        
         --> If you DO NOT wish to proceed, press the <ESC> key.            
   ͼ   
                                                                              
 ͹ 
                                                                              
                                                                              
                                                                              
 ͼ 

Figure 2: A sample warning message in HardBack's report window.
 ͻ 
          >>>  Welcome to HARDBACK  <<<               Copyright 1988         
          Hard disk to hard disk backup               John Haugeland         
 ͹ 
     <F1>   For HELP with HardBack, press the <F1> function key.              
     <F2>   Choose whether to preview or backup (now set for: PREVIEW).       
     <F3>   Choose a different source drive  (now = C:).                      
     <F4>   Choose a different backup drive  (now = D:).   ͹ 
  <Ctrl>C   To QUIT at any time, press the <Ctrl>C keys.     Elapsed time:   
  <Enter>   When ready to BEGIN, press the <Enter> key.           21.2       
 ͹ 
    >>>> PREVIEW of what WOULD happen in disk backup. <<<<                    
      On SOURCE drive:                                                        
        Directories scoured:  61     Files cross-checked: 789                 
                                                                              
      On BACKUP drive:                                                        
        Directories removed:   1     Directories created:   2                 
            Files displaced:  26                                              
            Files re-placed:  31                                              
 ͹ 
    PREVIEW completed without error; do you want to do a BACKUP now?          
    (If so, type Y; if not, type any other key to exit.)                      
                                                                              
 ͼ 

Figure 3: HardBack's report following a back-up preview.


 ͻ
          >>>  Welcome to HARDBACK  <<<               Copyright 1988         
          Hard disk to hard disk backup               John Haugeland         
 ͹ 
     <F1>   For HELP with HardBack, press the <F1> function key.              
     <F2>   Choose whether to preview or backup (now set for:  BACKUP).       
     <F3>   Choose a different source drive  (now = C:).                      
     <F4>   Choose a different backup drive  (now = D:).   ͹ 
  <Ctrl>C   To QUIT at any time, press the <Ctrl>C keys.     Elapsed time:   
  <Enter>   When ready to BEGIN, press the <Enter> key.           23.2       
 ͹ 
    >>>> SUMMARY of disk backup just completed. <<<<                          
      On SOURCE drive:                                                        
        Directories scoured:  61     Files cross-checked: 789                 
                                                                              
      On BACKUP drive:                                                        
        Directories removed:   1     Directories created:   2                 
            Files displaced:  26 --> moved:  16; trashed:  10; dumped:   0.   
            Files re-placed:  31 --> moved:  16;  copied:  15  (=    29 K).   
 ͹ 
    Finished (no errors).                                                     
                                                                              
                                                     Press any key to exit.   
 ͼ 

Figure 4: HardBack's report following a complete back-up. 
