home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d6xx
/
d652
/
burf.lha
/
Burf
/
Burf.Doc
< prev
next >
Wrap
Text File
|
1992-05-14
|
12KB
|
260 lines
BURF
----
Version 1.00 - April 1992
Copyright © Michael Tanzer 1992
+---------------------------------------------------------------------------+
| N O T I C E |
| |
| Freely distributable. Not to be used for commercial purposes without |
| written consent from the author. Not to be distributed without this |
| notice and accompanying components intact. |
| |
| This product is distributed on an 'as-is' basis, with no warranty of any |
| kind, either express or implied. No responsibility whatsoever is assumed |
| by the author for the use of this product, nor for any results of its |
| use. No claim whatsoever is made as to this product's accuracy, useful- |
| ness, completeness, nor suitability to any purpose. |
| |
| Components include the following files: |
| Burf |
| Burf.Doc (this document) |
| Burf.Doc.info |
| Install_Burf |
| Install_Burf.info |
| |
+---------------------------------------------------------------------------+
Syntax:
-------
The symbols '<' and '>' are used in this document to enclose optional
parameters, i.e. those that may be but need not be specified. Strings that
must be specified verbatim are shown in upper case; parameters are shown in
lower case. For example, the line:
RX BURF source <target>
indicates that 'RX BURF' must be entered as shown (although not necessarily
in upper case), 'source' is a required parameter, and 'target' is an
optional parameter.
What is Burf?
-------------
Burf is a BackUp ReFresher written in Rexx. It can refresh a backup copy of
a directory by copying only those files that have been added or modified
since the last backup.
Why use Burf?
-------------
Burf is useful for those times when you want to keep a backup of a directory
but don't want to run a complete backup of your system every time that
directory is changed. For example, you might keep a number of important
documents in a directory on your hard disk and back them up to floppy
fairly frequently, although you run a complete backup of your hard disk only
once in a while. Frequent incremental backups take up lots of diskettes,
and it takes too long to copy the entire directory or to search through it
trying to remember which files you changed.
Burf addresses this situation by copying only those files that are new or
that have been modified since the last backup. It can determine which files
have been modified either by comparing the dates of files in the source
directory with those in the target directory, or by checking the archive
flags in the source directory. It will check all subdirectories within
the source directory, duplicating them in the target directory if necessary.
Burf can also delete any subdirectory or file that is found in the target
directory but not in the source directory. This will ensure that your
backup will not contain any subdirectories or files that you no longer use;
it also ensures that there will be only one copy of any subdirectory or file
that has been renamed since the last backup. If this option is chosen, Burf
will also make sure that subdirectory names and file names in the target
directory exactly match those in the source directory. That is, if a
subdirectory or file in the source directory has already been copied to the
target directory but has since been renamed by capitalising letters in its
name, the copy will be similarly renamed. This ensures that the contents
of the target directory will exactly match the contents of the source
directory.
Burf can run asynchronously, so you can run it without tying up a CLI.
The result is that you can keep an up-to-date backup of any directory with
a minimum of effort.
Best of all, Burf is written in Rexx, so if you want to add or change a
feature, you can do it easily. And it's free.
What you need in order to use Burf:
-----------------------------------
You must have the following libraries in your LIBS: directory:
rexxsyslib.library (version 36.17 or later)
rexxsupport.library (version 34.9 or later)
These are available from a variety of sources and are not distributed with
Burf.
How to customise Burf:
----------------------
Copy Burf to your REXX: directory. (You can run 'Install_Burf' to do this.)
Edit Burf and check the settings of the variables 'flagsw', 'clonesw',
'ressw', 'asynchsw' and 'log'.
If you want Burf to check archive flags to determine whether a file should
be copied, set 'flagsw' to 1 (the archive flags will be set as each file is
copied); if you want Burf to compare file dates, replacing files in the
target directory with those in the source directory if those in the source
directory are more recent, set 'flagsw' to 0 (the archive flags will remain
unchanged).
If you want Burf to delete disused subdirectories and files from the target
directory, set 'clonesw' to 1. This will also cause Burf to make sure that
the names of subdirectories and files already in the target directory
exactly match those in the source directory. This option can be dangerous
(e.g. if Workbench: is the current directory and no target is specified,
you could wipe out your system), so Burf will prompt you to make sure you
want to continue if 'clonesw' is set to 1.
If you want Burf to make the COPY and PROTECT commands storage-resident,
set 'ressw' to 1. The commands will be removed from storage when Burf is
finished.
If you want Burf to run asynchronously (especially useful when backing up
large directories) set 'asynchsw' to 1. This enables Burf to run without
tying up a CLI. If this option is chosen, Burf will inform you when it has
finished via the SAY command in the Utilities directory. It will also use
this method to tell you if its operation is aborted due to a fatal error.
If this occurs, the last line of the log will indicate the action that
caused the error.
Burf writes a log of its activities. It will also show a number of counters
indicating the number of directories checked, made, renamed and deleted,
the number of files checked, replaced, added, renamed and deleted, and the
number of non-fatal errors that occurred during the backup. Any message in
the log indicating a non-fatal error begins with an exclamation point (!).
Set 'log' to indicate the output stream for the Burf log. If you choose
to have the log typed at the console, set this variable to '*'; if you
prefer the log to be written to a file, specify the file name (e.g.
'RAM:BurfLog'. You may not specify '*' if 'asynchsw' is set to 1 because
Burf has no console when running asynchronously.
How to run Burf:
----------------
To run Burf from the CLI, enter:
RX BURF source <target>
where 'source' and 'target' indicate the source and target directories. If
no target directory is specified, the current directory will be used.
For example, if you have a directory on your hard drive (DH0:) called
'Documents' and you want to keep an up-to-date copy on a diskette which you
have placed in floppy drive DF0: you could enter:
RX BURF DH0:DOCUMENTS DF0:
You could also enter:
CD DF0:
RX BURF DH0:DOCUMENTS
If your directory contains a subdirectory that you do not want to be backed
up, it is simple matter to write a Rexx program that invokes Burf to back up
the remaining subdirectories explicitly. If, for example, your 'Documents'
directory contains three subdirectories ('Letters', 'Memos' and 'Faxes') and
you want only two of them ('Letters' and 'Faxes') to be backed up, you could
use the following program once DF0:Documents has been created:
/* BurfDocs */
Burf 'DH0:Documents/Letters DF0:Documents/Letters'
Burf 'DH0:Documents/Faxes DF0:Documents/Faxes'
Note that Burf will create the target directory if it does not exist, but
will not create a directory to contain it. For example, if you specify
'DF0:Documents/Faxes' as a target and 'DF0:Documents' does not exist, Burf
will not attempt to create it.
If you have the good fortune to be using DirWork 1.51 (by Chris Hames), you
can invoke Burf by setting a button to:
'Burf ,uDP----drx Burf' (without the quotes)
Display the contents of the target directory in one file list and the
contents of the device (or directory) containing the source directory in the
other; select the source directory, then click on the Burf button. The
Command requester allows you to specify a different target directory. If
no target directory is specified, the 'd' special option causes the directory
displayed in the other list to become current when Burf is executed.
WARNING: DO NOT SPECIFY A TARGET DIRECTORY THAT IS CONTAINED WITHIN THE
SOURCE DIRECTORY. THIS WOULD RESULT IN A LOOP THAT WOULD RUN
UNTIL THE CAPACITY OF THE DEVICE CONTAINING THE DIRECTORIES IS
EXHAUSTED.
Explanation of non-fatal error messages:
----------------------------------------
! Rename failed.
An attempt to rename a subdirectory or file in the target directory
failed. The device containing the target directory may have Read Only
status. Write-enable the device and re-run Burf.
! Delete failed.
An attempt to delete a subdirectory or file in the target directory
failed. The device containing the target directory may have Read Only
status or the object may be unerasable. Write-enable the device or use
the PROTECT command to remove the 'u' flag and re-run Burf.
! File found: (file name)
A file in the target directory was found to have the same name as a
subdirectory in the source directory. If 'clonesw' is set to 1, the
file may have been deleted (check the log). Otherwise delete the file
before re-running Burf.
! Directory found: (subdirectory name)
A subdirectory in the target directory was found to have the same name
as a file in the source directory. If 'clonesw' is set to 1, the
subdirectory may have been deleted (check the log). Otherwise delete the
subdirectory before re-running Burf.
! Backup is newer.
In comparing the dates of two files, the file in the target directory
was found to be newer than that in the source directory. Delete the
file in the target directory, then copy the source file or re-run Burf.
Fatal errors:
-------------
Certain errors are regarded as fatal and cause Burf operation to be aborted.
These errors include the failure of the makedir() function and a non-zero
return code from any COPY, PROTECT or RESIDENT command.
Other things you might like to know about Burf:
-----------------------------------------------
Return codes from ADDRESS COMMAND are not available to Rexx programs running
under pre-2.0 versions of Amiga DOS. If you are running an old version, you
should be sure that the target directory is not write-protected and has
enough room for all the files in the source directory, and that the source
directory is not write-protected if 'flagsw' has been set to 1. Under
Amiga DOS 2.04 or later, Burf will terminate if any COPY, PROTECT or
RESIDENT command results in a non-zero return code.
You are free use Burf for as long as you like and to modify it in any way
that suits your needs, but please do not distribute a modified version. I
do not ask for any remuneration, but if you would like to send me anything
(except perhaps a duck), I would be delighted to receive it. I will make
a sincere effort to answer any questions you may have about Burf. My
address is:
Michael Tanzer
P.O. Box 289
Carlton North, VIC 3054
Australia
Telephone: +61 3 387 6589
Facsimile: +61 3 388 1863