
  *********************************************************************
                               FBack  V1.2
                            By Chris De Maeyer
                               For AmigaDOS
  *********************************************************************


  0. Contents
    ----------

     1. Introduction
        1.1. Legal
        1.2. What it does...
        1.3. Requirements
        1.4. Contact address
        1.5. Development info
        1.6. Versions

     2. Using it
        2.1. Command line options
        2.2. Examples

     3. Appendix
        3.1. Common problems
        3.2. Error messages
        3.3. The future


  1. Introduction
    --------------

     1.1. Legal
         -------
          Type  : - MAILWARE
          Terms : - no modifications to any file in this archive
                  - add no additional files to this archive
                  - use this program >30 days, then you should
                    reward the author with a postcard/letter, hence the term
                    mailware
                  - author can not be held responsible for data loss, the program
                    has been tested and the behaviour has been described below.


     1.2. What it does
         --------------
          'FBack' is a file copy tool. It will check the archive bit of files
          and copy them if the archive bit is not set. After copying it will
          add the archive bit. It can be used to perform a 'Daily' backup of
          changed files.
          
          Example: copies changed configuration files to backup location at boot,
                   backup changed files on a volume = maintaining a mirror.

          'FMirror' is available from Aminet as 'FMirrorv10.lha'. Its purpose is to
          delete files which no longer exist in the original directory, thus creating
          a mirror backup.


     1.3. Requirements
         --------------
          Properly installed Amiga ROM 2.04+.
          Needs XPK (the File Compressor) library when using this option.


     1.4. Contact address
         -----------------
          For information/problems/gifts/bugs etc. write to the address
          below, state version & add postage for reply:

                                 Visionary Software
                                 tav. Chris De Maeyer

                                 Norbertijnenstraat 4
                                 B-2040       BELGIUM
                                 EUROPE

                                 Internet: cdemaeyer@mmm.com


     1.5. Development info
         ------------------
          Sources were written in C and compiled using SAS/C V6.57.

          All file I/O has been coded using standard system library
          functions (V38+).


     1.6. Versions
         ----------
          V0.9   - first test version.

          V1.0   - cleaned up code
                 - adapt stack size + compile with stackextend, optimize
                 - first public release.
                 
          V1.1   - added file report after processing
                 - shortened output strings + reformat
                 - changed ExamineDir() flow, performs better with patterns
                 - message to indicate NOCOPY mode
                 - fixed error in document (FROM/A & TO/A examples).

          V1.1a  - changed some buffer sizes for speed, copybuffer = 16Kb.
          
          V1.2   - added packing mode
                 - added XPK packer/unpacker
                 - added date in version string.
                           

  2. Using it
    ----------
     2.1. Command line options
         ----------------------
          The program uses standard AmigaDOS command templates, so
          typing 'FBack ?' will list all the options available.

           Detail explanation of options:

             FROM/A       - the source path, a AmigaDOS file pattern may be
                            given.
                            
                                fe.   BOOT:
                                      BOOT:Prefs/
                                      BOOT:S/#?.keyfile
                                      
                            As you can see, a volume needs no '/'. However, a 
                            directory always needs a '/'.
                            If a volume/directory is chosen, only that part will
                            be checked, to include all subdirectories include the
                            'ALL' switch.
                            
                                fe.   FBack BOOT: TO BACKUP: ALL
                                      FBack WORK:data/ TO BACKUP:Sys/ PACK=HUFF ALL
                                      Fback WORK:data/calc/#?.wk1 TO BACKUP:Wks/ ALL
                                               
             TO/A         - the destination path.
             
                                fe.  BACKUP:
                                     SQ0:Backup/Workbench/
                                     
                            Same rules as above, a volume needs no '/'. A directory
                            always needs an ending '/'. 
                            As you might expect, the 'ALL' switch will create any
                            missing subdirectories in the destination path.
                                     
             NOCOPY/S     - this does exactly what it says, when a file has
                            been modified it is normally copied to the backup
                            location. Adding this parameter prevents this and the
                            program will merely report the file.

             ALL/S        - include subdirectories.
             
             QUIET/S      - no output messages.

             PACK=/K      - enables packer mode, supply preferred packer. In this
                            mode make sure your recovery disk includes the XPK library
                            + some XPK unpacker (fe. xpk [included]) to restore files.
                            
                                fe. PACK=nuke
                                

           The return code is either RETURN_OK (0) or RETURN_WARN (5) in all
           other cases.
           For some examples look at next section "2.2. Examples".


     2.2. Examples
         ----------
          This section lists some examples of usage.

          - Backup changed prefs files:

               ; Startup-sequence
               ...
               FBack sys:prefs/env-archive/ to work:backup/prefs/ ALL QUIET
               FMirror work:backup/prefs/ to sys:prefs/env-archive/ ALL QUIET
               ...

          - Mirror a disk at startup & create logfile:

               ; Startup-sequence
               ...
               FBack sys: to mirror:boot/ ALL >T:FBack.log
               FMirror mirror:boot/ to sys: ALL >T:FMirror.log
               ...
               

          - Mirror files before shutdown:
          
               .key FLAG
               .bra {
               .ket }
               ; Shutdown script
               echo "Just a moment, valuable files are checked..."
               ;
               if {FLAG} EQ "GFX"
                    FBack work:data/gfx/ to backup:data/gfx/ ALL QUIET
                    echo "Gfx data has been saved."
               endif
               if {FLAG} EQ "ALL"
                    FBack work:data/ to mirror:data/ ALL QUIET
                    FMirror mirror:data/ work:data/ ALL QUIET
                    echo "All data has been mirrored."
               endif
               ;
               FBack sys:prefs/ to mirror:prefs/ ALL PACK=BZLW QUIET
               echo "System preferences have been saved."
               ; 
               if exists C:Halt
                    echo "It now safe to switch me OFF !"
                    Halt 
               endif


  3. Appendix
    ----------
     3.1. Common problems
         -----------------
          Q: It doesn't find its source/backup files ?
          
          A: Enter the correct path: see section 2.1 (FROM,TO option).
          
          ---
          
          Q: I get a stack error ?
          
          A: Report this to me right away + add documentation in which
             situation it occurred.
              
          
     3.2. Error messages
         ----------------

          'Source/Destination not found'

             The entered path could not be located. Correct your paths !

          'File not found'

             The file you typed could not be found.

          AmigaDOS errors are in format :

             'FBack: nnn - message'


     3.3. The future
         ------------

          - add GUI
           
          Any suggestions from you are welcome !
          
  *********************************************************************
