home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff258.lzh / Backup / backup.doc < prev    next >
Text File  |  1989-10-18  |  14KB  |  403 lines

  1.  
  2.                    BACKUP.DOC
  3.  
  4.                  V2.04
  5.  
  6.                 8 October 1989
  7.      (c)Copyright 1988-1989, Matthew Dillon, All Rights Reserved
  8.            Freely Distributable for non-profit only
  9.  
  10.  
  11.                   (I)
  12.                 OVERVIEW
  13.  
  14.     Backup and Restore (same executable, just renamed) allow you to backup
  15.     any directory tree with optional compression, and later extract all
  16.     or part of the tree.  The protection, date, and file comment is saved
  17.     with each file.
  18.  
  19.     SEE SECTION (6), FLOPICAL BACKUP, for options pertaining to backing
  20.     up directly to floppies.
  21.  
  22.     LIMITATIONS:    When using -c (compress), the entire result of the
  23.     compressed file must fit into memory.  Any files (after compression,
  24.     if any) larger than a floppy when backing up to floppies cannot be
  25.     handled yet.
  26.  
  27.     BACKUP/RESTORE can also be used to enclose a set of files or
  28.     directory tree for file transfer:
  29.  
  30.     backup dir -ooutfile.bak        create an archive
  31.     restore outfile.bak            restore an archive
  32.     restore -t outfile.bak            list an archive
  33.  
  34.  
  35.                   (I)
  36.                   INSTALLATION
  37.  
  38.     Copy the (1) executable to your C: directory twice, naming one
  39.     'Backup' and the other 'Restore'.  The program looks at the first
  40.     character of its name to determine whether the default is to backup
  41.     or restore.  If you don't have the space, all is not lost ... you
  42.     simply need to specify backup or restore explicitly with the options
  43.     (-b or -r).
  44.  
  45.                    (2)
  46.                  EXOTIC FEATURES
  47.  
  48.     Backup does not write directory trees which contain no files.  Thus,
  49.     when doing incremental backups on a large hard disk, the structure of
  50.     directory sub-trees which have no new files in them will not be
  51.     written.  So if you only modified a couple of files since the last
  52.     backup, there won't be 50K of structure-overhead.
  53.  
  54.     You can specify compression (-c) in the backup.  All files are
  55.     compressed (there must be enough RAM to hold the largest file in
  56.     its compressed state).  Those files which would turn out larger after
  57.     compression than before are NOT compressed.  Certain file suffixes
  58.     cause the compression attempt to be skipped entire:  .Z, .ARC, and .ZOO
  59.     files
  60.  
  61.       IT IS SUGGESTED YOU USE THE COMPRESSION FEATURE EVEN THOUGH IT
  62.       SLOWS DOWN THE BACKUP.  The resulting backup file will be
  63.       significantly reduced in size.  Even though a full backup will
  64.       take a long time, you only do that every once in a while and
  65.       as incremental backups are shorter, they take much less time.
  66.  
  67.     'Pick' patterns are supported (backup only paths which match the
  68.     specified patterns), and 'Discard' patterns are supported (do not backup
  69.     paths which match the specified patterns).    Discard patterns override
  70.     Pick patterns.
  71.  
  72.                   (3)
  73.                 OPTIONS
  74.  
  75.     Here is a list of Backup/Restore options.
  76.  
  77.     -0    (Restore) Causes all files to be restore to the current
  78.         directory (or -odirectory) rather than breaking them out
  79.         into a directory tree.
  80.  
  81.     -A    ARCHIVE.
  82.         (Backup) Causes the archive bit to be set on files
  83.         being backed up.
  84.  
  85.         (Restore):  If specified, the archive bit is cleared on
  86.         restored files.  Otherwise the archive bit will be set,
  87.         causing the files to be backed up again on the next
  88.         incremental backup.
  89.  
  90.     -U    UPDATE.  (Backup) Restricts the backup to only those files
  91.         which do not have the archive bit set.    Additionaly, the
  92.         structure of empty directory trees is not saved.
  93.  
  94.     -b    BACKUP    (this is the default if the first character in
  95.         the executable is a 'b')
  96.  
  97.     -r    RESTORE (this is the default if the first character in
  98.         the executable is an 'r')
  99.  
  100.     -a    APPEND (Backup)     Cause the backup to be appended to
  101.         the specified (-o) file rather than overwriting it.  Useful
  102.         for incremental backups.
  103.  
  104.     -c    COMPRESS (Backup)   Cause all files to be compressed, if
  105.         possible.  Restore automatically decompresses files which
  106.         have been compressed.  This is the same algorithm used
  107.         in the UNIX compress command.
  108.  
  109.         NO COMPRESSION WILL EVEN BE ATTEMPED ON FILES WITH THE
  110.         FOLLOWING SUFFIXES: .Z .ARC .ZOO
  111.  
  112.     -Cpat    Add the pattern to the list of patterns that are assumed
  113.         to be compressed already (so we don't waste time trying to
  114.         compress them if the -c option has been given
  115.  
  116.     -f[#kb] Turn on backup fragmentation and specify the fragment size,
  117.         default 800K (for backing up to floppies).  NOTE: Currently,
  118.         files larger than the fragment size cannot be backed up!
  119.  
  120.         Note: a suffix is added to the file name w/ a sequence
  121.         number, but each fragment is a complete backup file unto
  122.         itself and may be restored out of order.
  123.  
  124.         Any numerical value specified is in K, i.e. -f800 == 800K
  125.  
  126.         Note: prompting is enabled when one or more -F options
  127.         are given.  -f does not automatically enable prompting.
  128.  
  129.     -Fvol:    Add the volume (df0:, df1:, etc..) to the drive sequencing
  130.         list.  The idea is to specify several -F options which are
  131.         cycled through and prefix each fragment.  This also
  132.         enables prompting... the program prompts whenever it
  133.         switches to the next fragment.
  134.  
  135.         If -F is not specified at all and -f is, no prompting
  136.         occurs.
  137.  
  138.     -s    Only display directories as we go along
  139.  
  140.     -S    Silent... don't display files or directories
  141.  
  142.     -v    Verbose... display those files which will NOT be backed
  143.         up as well as those that will.
  144.  
  145.     -l/-t    (both do the same thing).  (Restore)   LIST the archive
  146.         only, do not do an actual restore.
  147.  
  148.     -T    (Restore)   Restore ONLY the timestamp, comment, and
  149.         protection fields.  This is incredibly useful to
  150.         restore timestamp information to files that already
  151.         exist.    NO files are overwritten or created on the
  152.         destination volume(s).
  153.  
  154.     -n#    (Backup)    Sets the output buffer size, in KILOBYTES.
  155.         Default is 64.
  156.  
  157.     -pPAT    (Backup)    Restrict the backup to files which match the
  158.         specified pattern.  Up to 32 patterns may be specified.
  159.  
  160.         (Restore)   Extract only those files which match the
  161.         specified pattern.
  162.  
  163.         NOTE:  The pattern is matched with the COMPLETE PATH as
  164.         shown in the -t option.  '*' and '?' wildcarding is supported
  165.  
  166.     -dPAT    (Backup)    Do not backup files which match the specified
  167.         pattern.   Up to 32 patterns may be specified.
  168.  
  169.         (Restore)   Do not extract files which match the specified
  170.         pattern.
  171.  
  172.         NOTE: The pattern is matched with the COMPLETE PATH as
  173.         shown in the -t option.  '*' and '?' wildcarding is supported.
  174.  
  175.     -oFILE    (Backup)    Specify the OUTPUT FILE for a backup.  IF NO
  176.         OUTPUT FILE IS SPECIFIED, NO OUTPUT FILE IS CREATED.  I.E.
  177.         you can take a second pass just to set the archive bit.
  178.  
  179.         (Restore)   Specify the directory to place the restored
  180.         directory tree.  (This overrides the volume the backup
  181.         was saved from).  If no directory specified, the original
  182.         volume used in the backup will be restored to.    If no
  183.         volume was specified in the backup but rather a relative
  184.         path was, the restore will be relative to the current
  185.         directory.
  186.  
  187.                   (4)
  188.               STANDARD METHOD OF BACKING UP
  189.  
  190.     Note that with combinations of -o, -A, and -U, you have many choices
  191.     available to you when backing up files.  For hard disks, backups are
  192.     normally done in two phases:
  193.  
  194.     -Once a month do a complete backup of your hard disk
  195.     -Every day do a much smaller 'incremental' backup which backs
  196.      up only those files which have been modified/created since the
  197.      last backup.
  198.  
  199.     The master backup, plus the N incremental backups together
  200.     reconstruct your disk up to the moment.  After a while the
  201.     number of incremental backups will be so great (and messy),
  202.     that you will want to do another complete backup and start
  203.     again.
  204.  
  205.     IN THIS WAY, the COMPRESS option can be put to good use.  The
  206.     incremental backups are usually small, and can be compressed
  207.     relatively quickly.  The complete backup should also be compressed
  208.     (-c in case you forgot) though this will take a much longer time...
  209.     but then again the complete backup is not done every day.
  210.  
  211.     UPDATING THE ARCHIVE BIT ON THE FLY VERSES TAKING A SECOND PASS.
  212.     Updating the archive bit involves writing to the disk.  For complete
  213.     safety you probably do NOT want to update the archive bit while you
  214.     are backing up the files in question.  The following two-pass method
  215.     works well:
  216.  
  217.         (COMPLETE BACKUP)
  218.  
  219.     backup    -c -d"*.o" volume: -ooutput
  220.     backup    -A volume:
  221.  
  222.         (INCREMENTAL BACKUP)
  223.  
  224.     backup -U -c -d"*.o" volume: -ooutput
  225.     backup -A volume:
  226.  
  227.     The -d option is saying "Don't backup all those object modules I left
  228.     laying around".
  229.  
  230.     The first command backs up only those files which have be modified
  231.     or created but does NOT update the archive bit.  The second command
  232.     updates the archive bit without doing anything else (no output file
  233.     is specified and thus none is created).  The second command goes
  234.     extremely quickly since files are not actually read.
  235.  
  236.     For your INCREMENTAL backups, risking modifying the archive bit while
  237.     backing the files up is feasible,  Since very few files will be
  238.     backed up (comparitively):
  239.  
  240.     backup -a -UA -c -d"*.o" volume: -ooutput
  241.  
  242.     In this case I use the -a option (append).  You might NOT want to do
  243.     this and save the incremental backups as separate files.
  244.  
  245.  
  246.                   (5)
  247.               STANDARD METHOD OF RESTORING
  248.  
  249.     Restoring a backup to the original volume: (Restore or Backup -r)
  250.  
  251.     NOTE:  If the -A option is specified, restored files will have
  252.     their Archive bit set.  If -A is NOT specified, files will have
  253.     their archive bit cleared and will thus be re-backed up on the next
  254.     incremental backup.
  255.  
  256.     NOTE:  When restoring files, remember that the incremental backups
  257.     will have the newest modifications and should be specified LAST:
  258.  
  259.     Restore completebkfile incr1 incr2 incr3....
  260.  
  261.     Partial Restore using -p:
  262.  
  263.     Restore -pstuffIWant bkfile1 bkfile2 bkfile3...
  264.  
  265.     ARCHIVE LISTING:
  266.  
  267.     Restore -t bkfile1 bkfile2....
  268.  
  269.     NOTE:    Two 'sizes' are given in the listing.  The first
  270.     is the # bytes the file takes up in the archive, the
  271.     second is the actual size of the file.
  272.  
  273.  
  274.                   (6)
  275.               FLOPICAL BACKUP AND RESTORE
  276.  
  277.     There are two problems associated with floppy backup and restore:
  278.  
  279.     (1) A single file on the HD may be two big for a single floppy
  280.     (2) It may take a lot of floppies to backup an HD
  281.  
  282.     Additionaly, one wants the following conveniences:
  283.  
  284.     (1) Be able to backup to a logical progression of (floppy) drives,
  285.     inserted blank disks in while the system is working on other
  286.     drives.
  287.  
  288.     (2) Be able to restore the same way
  289.  
  290.     (3) If one or more floppies is destroyed be able to restore from the
  291.     remaining floppies.
  292.  
  293.         Currently, you can specify which devices to cycle through
  294.         with the -F option (-Fdf0: -Fdf1: -Fdf2:), but BACKUP will
  295.         always prompt you before continuing.  Since it uses the
  296.         console device, you can specify the yes response as many
  297.         times as you have floppies in ready drives.
  298.  
  299.         Currently, files larger than the specified -f size (800K
  300.         default) cannot be handled if using -f/-F ... However, by
  301.         enabling compression larger files can still fit.
  302.  
  303.         Currently, the entire compressed result of a file must be
  304.         able to fit into memory during the backup.
  305.  
  306.  
  307.                    ***
  308.  
  309.     BACKUP.    Specify the -f option and then -Fvol: for each floppy
  310.     drive (in the order you want) to backup to.  Example:
  311.  
  312.     -f -Fdf0: -Fdf1:
  313.  
  314.     (Also keep in mind all the options listed in sections (3), (4), & (5))
  315.     Currently, you must have PRE-FORMATTED all your backup disks since the
  316.     backup/restore works through normal files.    The system will prompt for
  317.     readyness every time it completes a section.
  318.  
  319.     The backup process never deletes files, only creates or overwrites
  320.     them.  Thus, accidently sticking in a non-blank or incorrect backup
  321.     disk will probably result in a disk-full requester.... not Fatal, though
  322.     inconvenient.
  323.  
  324.     You must still specify the -o option to name the output file, which will
  325.     be prefixed with the next -F volume in sequence and suffixed with the
  326.     sequence number. (.nn)  The disk labels for your floppies may all be
  327.     the same.
  328.  
  329.     EXAMPLE:
  330.  
  331.     backup    -c -d"*.o" -f -Fdf0: -Fdf1: -Fdf2: volume: -oxxbak
  332.     backup    -A volume:
  333.  
  334.     NOTE:    You do NOT specifiy a volume prefix in the -o option ..
  335.     those specified by -F are automatically cycled through as the
  336.     prefix.
  337.  
  338.     * If your hard disk has enough space on it I suggest you backup to an
  339.       alternate partition using only -f (not -F which forces user prompts),
  340.       then copy the chunks to floppies after the entire backup has
  341.       completed.
  342.  
  343.                    ***
  344.  
  345.     RESTORE.    Restore works the same way.  EACH DISK IS INDEPENDANT!    You
  346.     may insert disks in any order to be restored.  Simply execute the
  347.     standard restore command in section (5) for each floppy.
  348.  
  349.     Destroyed disks may be skipped.  Currently, no support for partially
  350.     restored disks exists... i.e. the archive has to be clean.
  351.  
  352. V2.04:
  353.     Restore exits without a warning message if it comes across
  354.     a 0 or ^Z when it is expecting a header (so you can restore
  355.     frlom XModem files)
  356.  
  357.     entries are checksumed (so you don't think you've got a
  358.     valid archive if you download over a noisy line).
  359.  
  360.  
  361. V2.03:
  362.     Restore:    a file named the same as its parent directory didn't
  363.             get restored if restore had to create that parent
  364.             directory.    i.e. ram:etc/etc (the last etc being a file
  365.             name) would not get restored.
  366.  
  367.             Restore now properly restores things into the directory
  368.             specified by the -o option.  Before it would only do
  369.             that if a volume (blah:) was specified as the first
  370.             path segment.
  371.  
  372.             Restore now creates the directory specified by -o if
  373.             it does not already exist.    Also, lines like this:
  374.  
  375.             restore -oblah relative_path
  376.  
  377.             would fail w/ restore not being able to find the
  378.             relative path (it had already cd'd somewhere else).
  379.  
  380.     Backup:     Empty directory trees are now saved.  Before backup
  381.             would not save them.  However, if -U is specified
  382.             empty directory trees are not saved. (i.e. the master
  383.             backup has the whole directory structure while
  384.             incremental backups have only the structure pertaining
  385.             to newly saved files).
  386.  
  387.     -Cpat        New option, add pattern to list of patterns that will
  388.             no be compressed if -c is given.
  389.  
  390.     -0        (Restore): Causes all files to be restored to the
  391.             current (or -o) directory.
  392.  
  393. V2.02:
  394.     More minor bug fixes
  395.  
  396. V2.01:
  397.     Fixed bugs in restore (did not restore files into the proper
  398.     directories), and in backup (-a append flag did not work)
  399.  
  400. V2.00:
  401.     First release of V2
  402.  
  403.