home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d170
/
mrbackup.lha
/
MRBackup
/
MRBackup.TXT
< prev
next >
Wrap
Text File
|
1988-11-22
|
68KB
|
1,313 lines
MRBackup Version 2.4
A Hard Disk Backup Utility
for the
Commodore Amiga
August 1988
Mark R. Rinfret
Introduction
This document describes a program, named MRBackup
(pronounced M R Backup, not Mister Backup :-), which will allow
you to backup the files on an Amiga hard disk drive to floppy
disk media. I wrote MRBackup primarily out of my own need. I also
saw it as a means for learning more about programming the Amiga.
Please take the time to read this document carefully. There are
some fine points ("Now THOSE are some fine points!") about the
program that you won't want to miss.
MRBackup is reasonably flexible, allowing you to back up
individual directories, directory trees or a whole disk. You can
backup from one directory hierarchy and restore to another.
Incremental backups can be performed based on file modification
dates. MRBackup also uses, at your discretion, the "archive bit"
feature added with release 1.2 of the WorkBench. Just for fun,
MRBackup also talks. Though this is may seem frivolous, the
speech capability provides a method for alerting you that a new
output disk is required for formatting.
MRBackup is not fast. When choosing a method for packing the
backup data, a fast-scan approach with specialized backup
directory structure was considered. However, there is an inherent
danger in committing multiple files to a specialized file system
which can only be accessed through a solitary piece of software.
I decided to maintain the AmigaDOS file system structure which
has a great deal of integrity and allows the backup media to be
accessed by standard software. When I do it again, I'll probably
go with the specialized approach - the current method is just too
darned slow.
The user should take a serious and organized approach to
his/her backup methods, however. I highly recommend that backup
listings be kept in a safe place (I use a 3-ring binder) and
backup floppies be stored safe from magnetic damage or other
hazards (like spilled coffee - argh!). A truly committed
individual will backup his entire disk once a month, once a week
and "areas of interest" once a day (default).
MRBackup attempts to economize on output media usage by
using Lempel-Ziv data compression/decompression (at the cost of
time). This is an option which can be enabled/disabled via menu
selection. The compression routine used was lifted from the Un*x
"compress" program but has been adapted to employ buffering and
native AmigaDOS I/O.
Operation
To use MRBackup, click on the program icon or type MRBackup
at the CLI prompt. A new window will open in which you will see a
STOP sign, some other gadgetry, and a couple of embedded
windows. If you click with the right mouse button and drag from
left to right across the menu bar, you'll see the various program
menus which control MRBackup's operation.
Pathname Specifications Window
The Pathname Specifications window is where you tell
MRBackup where data is coming from and going to. It is important
to note that the meanings of "Home Path" and "Backup Path" remain
the same for a backup or a restore operation. That is, the "Home
Path" always refers to the files' normal "home" and "Backup Path"
always refers to the location where the copies are kept. The
"Home Path" may be the name of any disk directory or volume or
file-structured logical name. The "Backup Path" must specify the
name of a floppy disk device if formatting is enabled.
Otherwise, it may specify any directory, volume or file-
structured logical name. If you try to backup/restore from/to
SER:, PRT:, etc., you shouldn't get far. If you do, I'd like to
hear about it. I've always wanted to be able to restore from
PRT: :-).
The "Listing Path" refers to the destination of a detailed
listing of the contents of the backup floppies and may specify
the printer (PRT:, default) or a file. The listing is an option
which may be enabled/disabled via a Flags menu selection.
The "Exclude Filter", if specified, is the name of a file
which contains lines describing files which should not be backed
up. The default pathname for this file is "S:MRBackup.xcld".
Note that this pathname may be overridden in the initialization
file, MRBackup.init. Any filename matching an entry in this list
will be excluded from a backup. The exclude filter consists of
file specifications, one per line, or comments (a line with a
number sign - # - in column 1). Blank lines are ignored. Also,
the specifications are case-insensitive. That is, "SYSTEM" and
"system" are equivalent. It is important to note that the
pathname specifications in the exclude filter are assumed to be
RELATIVE to the home device. Everything up to and including the
colon (:) in the Home Path specification should be omitted from
the exclude filter specifications. Examples:
# Exclude all object files
*.o
# Exclude all files beginning with "System"
system*
# Exclude all ".info" files
*.info
# Exclude the "include" directory and all subdirectories
include
# Exclude any file ending in a period followed by one character
*.?
The "Compress Filter" provides a function similar to the
exclude filter. It declares the name of a file which contains
filename patterns of files which should not be compressed during
backup when the Compress Files option is enabled. The default
name of this filter is "S:MRBackup.cflt". It has been found that
certain files will actually expand when subjected to the Lempel-
Ziv compression algorithm employed by MRBackup. Files which fall
into this category include archives created by the ARC and Zoo
programs. Also, files previously compressed should not be
compressed a second time. Other files which exhibit this
behavior included several types of graphics files including
certain IFF ILBM files and GIF files. There are three built-in
specifications. They are:
*.arc Files created by the ARC archiver
*.zoo Files created by the Zoo archiver
*.Z Files created by MRBackup compression or the
standalone "compress" utility.
Other specifications that you might want to include are:
*.GIF Graphics Interchange Format files (Compuserve)
*.IFF IFF files (assuming you use this convention)
Naturally, in order to fully utilize this feature, you will have
to adopt some naming conventions for files of this category.
The "Preferences" pathname allows you to specify the name of
a file holding your current MRBackup preferences. You can
customize the operation of MRBackup through the use of an
initialization file. When you first run MRBackup, it looks for
the file named MRBackup.init, first in the current directory,
then in the S: directory. Each line in the file consists of an
option setting, of the form:
OPTION = VALUE
or a comment. Comment lines may begin with any of the following
"special" characters: #, !, ;, $, %, & or *. A sample
initialization file is included on the next page. It illustrates
the use of all possible parameter settings.
# This is the MRBackup preferences/initialization file.
# This file is comprised of parameter settings and comment lines.
# Parameter setting lines are of the form:
# <keyword> = <value>
# where <keyword> names the parameter to be set and <value> is
# either a boolean (YES/NO) or a string value.
# Comments may begin with any of these special characters:
# '#!;$%&*'.
# Leading blanks are discarded and empty lines are ignored.
# Here are your current default settings:
# Enable/Disable Lempel-Ziv file compression or decompression.
compression = YES
# Should MRBackup generate a paginated listing during backup?
listing = YES
# Should MRBackup talk to me?
speech = YES
# Are floppies to be formatted during backup?
format = NO
# Should MRBackup split large files across multiple floppies?
bigfiles = YES
# Should MRBackup set/use archive bits during backup/restore?
archivebits = YES
# What is the name of the home device/volume/directory?
home = DH0:src/mrbackupv2.4
# What is the name of the backup device/volume/directory?
backup = DF1:
# What is the name of the listing device or file?
list = mrbackup.list
# What is the name of the exclude filter file?
exclude = MRBackup.xcld
# What is the name of the compression filter file?
cfilter = S:MRBackup.cflt
# Let MRBackup talk to me.
speech = YES
# Format each floppy targetted for output.
format = YES
# Do special processing for "big files".
bigfiles = YES
# Provide special handling of the "archive bit".
archivebits = YES
Backing Up a Disk
The instructions that follow assume you are going to backup
your hard disk, or a portion of it, to unformatted floppy
diskettes. You may also move files from/to just about any file-
structured volume or directory. Just remember to disable disk
formatting to relax the Backup Path restrictions. To back up your
hard disk, or a section of it, first get an indication of the
size of the area with the Info command, "ls" (if you have it),
List, etc. If you multiply the total number of bytes (blocks *
512) by 0.65, then divide by 800000, you should get a very rough
estimate (probably high) of the number of floppy disks
required to back up that area. The floppies selected for backup
need not be preformatted, as MRBackup will format them as needed.
You should be sure, however, that no valuable data exists on them
since it will be destroyed by the formatting process, if
formatting is enabled.
Once your floppies are ready and stacked neatly within reach
(get some labels and your favorite marker pen, too!), the fun
begins. First, modify the pathname specifications according to
your requirements. Normally, the "Home Path" would be the device
name of your hard disk or a directory on it (e.g. DH0:) while the
"Backup Path" would specify the device name of one of your
floppy drives (e.g. DF0:). While earlier versions of MRBackup
were pretty rigid in this regard, this version will allow you to
specify ANY disk device name in either specification. PLEASE BE
CAREFUL! Many users asked for this increased flexibility. Just
be aware that it carries with it an increased risk that you now
have more "opportunity" to burn yourself with improper pathname
specifications.
Finally, the listing path may be set to the printer device
(PRT:) or to the name of a file on a hard drive or any available
floppy drive not being used by the backup. The listing path will
be ignored if you disable the Generate Listing option in the
Flags menu.
Make sure that you have set the desired options in the Flags
menu, then select Backup from the Project menu. You will be
prompted with a date requester. The default date value that
appears is the "beginning of time", in Amiga terms. This causes
all files to be considered for backup. If that is satisfactory,
simply depress the RETURN key and the backup will commence. If
you desire to change the date, edit the date value as necessary,
using the standard Amiga conventions. Remember that to clear the
gadget you may press right-Amiga-x. A null date value (all
blanks) is allowed, should you want to backup all files in the
home path, regardless of their creation dates. The minimum date
value handled by this date requester is 01/01/78. The required
date and time format is MM/DD/YY HH:MM:SS (24 hour clock), the
time specification being optional. You will notice upward and
downward pointing "arrows" above each date component. Clicking on
the appropriate arrow will increment or decrement the respective
portion of the date. Though the values normally will wrap around,
not affecting adjacent date components, certain situations will
arise where incrementing a day value may cause the month to
increment (incrementing February 28 in a non-leap-year will yield
March 31). There is also a "NOW" gadget. Though not too
meaningful by itself, it provides a convenient way to "click in"
dates like "yesterday". To do this, simply click on the "NOW"
gadget, then click on the uparrow gadget above the day field of
the date.
Once the date has been entered, the rest is fairly
automatic. You will be prompted immediately for a floppy disk.
Insert it into the floppy drive that you specified in the backup
path and the disk requester will be satisfied. Should you want to
abort, simply hit the CANCEL gadget in the requester. Also, you
may abort the backup process at any time by hitting the STOP
gadget which appears in the top left area of the screen. This
gadget is checked prior to each block write operation, so be
patient if it does not respond immediately. Use the STOP gadget
with caution - it really lives up to its name!
As each floppy disk is filled, you should promptly label it.
If formatting is enabled, MRBackup automatically generates volume
names of the form:
Backup MM-DD-YY.<sequence number>
Also to be noted is the fact that the files on the backup media
retain the creation/modification date, comments (FileNotes) and
protection bits of their counterparts on the home device.
You will find that the Amiga's multitasking environment
shines when using this program. For those long-haul backups, get
everything started, then shove MRBackup's screen to the back and
go start something useful. MRBackup will carry on without your
watchful eye. When it needs a disk, the disk requester will pop
out in front of everything and MRBackup will ask (out loud, if
speech is enabled ) for another disk. Having something else to do
will make the time pass faster.
Restoring the Backups
No, this isn't always the bad part. Backup and restore can
also be useful when your hard disk is crowded and you have to
"juggle" data around. The restoration process is quite similar,
mechanically, to the backup process - it's just reversed. In
addition, the meanings of the pathname specifications are altered
somewhat. The "Home path" describes the destination for the
restored files and, as with the backup process, may specify the
hard drive only or a directory specification. The "Backup path"
describes the file or files to be restored and thus may be
defined down to the file level (1 file).
Note that on a restore operation, the file creation date of
the backup file is compared to its matching file (if it exists)
on the home device. If the file on the home device is newer, the
file will not be replaced. If this is desired, the file on the
home device must be deleted first. A later version of this
program will probably offer a "force" or "force with prompt"
option.
Menus
This section provides a brief description of MRBackup's
menus and their items.
Operations Menu
The Operations Menu provides access to MRBackup's major
processing functions. They are:
About
This item gives a quick description of MRBackup's
features and lists my address and phone numbers.
Backup
This command begins the backup process. You should
first be sure that all Pathname Specifications and Flags
menu settings are correct.
Resume Backup
This command allows you to backup your hard disk in
stages or recover from an interruption, such as a power
failure. Prior to "starting" each backup floppy, MRBackup
writes information about its current internal state to a
file named S:MRBackup.context. The first line of this file
is the disk sequence number (1..n). The second line is the
name of the first file to be written to the floppy. The
third line is the backup "delta date". Subsequent lines are
the names of files and directories in MRBackup's top-level
file list. As long as the file specified in line 2 can be
found, MRBackup should be able to resume your backup, even
if changes have occurred since the original backup was
interrupted. You may even edit the context file for special
situations where you wish to backup a disjoint set of
directories.
Restore
Restore allows you to recover files from backup
floppies previously created with the Backup or Resume Backup
commands. MRBackup will prompt you for floppy disks as they
are needed. Note that there is no prescribed order for
restoring floppy disks.
Load Preferences
This command reads your Pathname Specifications and
Flag menu settings from a file named S:MRBackup.init. You
would typically use this command to restore MRBackup's
settings to your startup settings.
Save Preferences
This command writes the current Pathname Specifications
and Flag menu settings to the file S:MRBackup.init. This
allows you to establish MRBackup's default initialization
parameters. MRBackup will attempt to make a copy of the
current preferences to a file of the same name, but with an
extension of ".bak". If the preferences name you have
specified does not currently exist, MRBackup will inform you
that it could not make a backup. Ignore the message in this
case.
Utilities
The Utilities command provides a means for performing
certain operations on select groups of files. It provides
its own window and support gadgetry. The utilities provided
and the means for accessing them are described in a later
section of this document. PLEASE READ THE UTILITIES
DOCUMENTATION CAREFULLY! Operation of these utilities is
not entirely intuitive and there are certain operating
characteristics that you must be aware of if you are to use
them correctly. Also, these utilities do not attempt to be
a replacement for the standard AmigaDos utilities. Rather,
they are provided as a convenience for use while running
MRBackup.
Quit
Alas - all good things must come to an end. As much fun
as MRBackup is to use, you'll probably want to put it away
once in a while :-).
Flags Menu
The Flags menu allows you to set or clear certain
operating parameters (flags) which constrain MRBackup's
operation. A flag is considered "set" if there is a
checkmark to the left of its name in the Flags menu. Each
time the item is selected it will toggle to the opposite of
its current state.
Compress Files
This option, when set, allows files to be compressed
during backup and decompressed when restoring. File
compression can typically save from 35% to 60% of the
original file size. Though this is more costly in terms of
time, fewer floppies will be required to perform a backup.
Also, in some cases, files which already contain data with a
highly random distribution of values (graphics files, for
instance) will actually start to expand when an attempt is
made to compress them. MRBackup will detect this condition
and abort compression on that file, copying it instead.
Do Big Files
Big files are files whose size exceeds the formatted
capacity of a floppy diskette (1756 blocks). In order to
backup big files, MRBackup must split them across two or
more diskettes. In order to accomplish this, a special
information file, MRBackup.bigfile, is written to each
backup diskette containing a big file. MRBackup also
requires another flag, Format Destination, to be set in
order for big file backup to be attempted. If these
conditions are not met, MRBackup will simply skip over the
big file, reporting the event.
Generate Listing
This option causes MRBackup to list the contents of
each backup diskette (created by the Backup command) to the
file or device specified by the Listing Path in the Pathname
Specifications window.
Speak
Setting the Speak flag allows MRBackup to talk to you.
This is especially useful when doing backups. When a new
floppy disk is required, MRBackup will call you for help
(it's a pity the Amiga doesn't have a diskette jukebox
feature).
Format Destination
This flag is normally set and tells MRBackup to format
each floppy used for backup purposes. However, you may wish
to disable this feature for special backups which you prefer
to "refresh" by writing over previous versions of backed up
files.
Use Archive Bits
A new feature, added with release 1.2 of the WorkBench,
is an archive bit in each file's protection word. This bit
is cleared whenever a file is modified and can be set by
MRBackup when a file is backed up. When this option is
enabled, files for which the archive bit is set will not be
backed up. This gives you a very accurate method for backup
selection if you're careful with your backup diskette
library.
Windows Menu
The Windows menu allows you to reactivate windows which have
been closed. Currently, the only window supported in this manner
is the Pathname Specification window, which you may close once
all pathname specifications have been made.
Utilities Operation
The MRBackup Utilities window is activated by selecting
"Utilities" from the "Project" menu. The utilities provide a
range of services which augment the power of MRBackup and lend
convenience to its use. PLEASE READ THIS SECTION CAREFULLY! The
proper operation of these utilities may run counter to what you
expect and some of the features/capabilities are quite subtle.
The first point to be noted is that these utilities are
designed primarily to perform operations across directory or
device boundaries, though the Compress and Decompress operations
may be performed in a single directory and the Delete operation
always works on a single directory. At the heart of the
utilities' operation is a highly interactive file requester which
supports the concept of "extended selection" (quite common on
you-know-who's computer). With extended selection, you can
select a subset of files listed for a given directory by holding
down the SHIFT key during the selection process. This group of
files may then be "fed" to the desired operation. I will discuss
this in more detail later on.
Now, let's get acquainted with the layout of the MRBackup
Utilities window. If MRBackup isn't already running on your
Amiga, fire him up and select the Utilities command from the
Project menu. Refer to the screen while reading this document to
maintain your orientation.
The first thing you should have noticed when the MRBackup
Utilities window was activated was that the Progress Window was
resized, repositioned and brought to the front of the screen,
obscuring the main window title. This is to allow MRBackup to
report errors to you during the use of the utilities. Next, note
the "close box" (rectangle with the dot in the middle) on the
title bar of the MRBackup Utilities window. The utilities are
exited by clicking in the close box. At that time, the Progress
Window will also be put back where you had it (polite, huh?).
The top-leftmost gadget is labeled "FileSpec". This gadget
allows you to limit your file searches ("From" directory only) to
only those files matching a given pattern. Normally, this
pattern, if specified, will include the wildcard characters "*"
and "?". For instance (and we're jumping ahead of ourselves a
little), if you want to decompress a group of files, it is highly
reccommended that you first enter the string "*.Z" into the
FileSpec gadget. This limits visibility to only those files
which end in ".Z" (the only files which can be decompressed). If
you wanted to delete all object files, you would probably enter
"*.o" into the FileSpec gadget. Get the picture? For those who
are totally unfamiliar with wildcard (meta) characters, an
asterisk (*) is used to represent any number of characters, while
a question mark (?) represents exactly one character. Got the
drift? Good.
To the right of the FileSpec gadget is a teaser. This
gadget, shaped to look like a combination hard drive/floppy drive
unit, will eventually enable you to cycle through the available
storage devices on your system. Right now, it just sits there
and flashes at you if you click on it. Dumb!
Below the FileSpec gadget are two triplets of gadgets,
labeled "From" and "To". The "From" gadget is a device or
directory pathname specification for the source of a group of
files to be operated on. The "To" gadget specifies the device or
directory which is the destination for these files (where
appropriate). The funny looking things to the left of "From" and
"To" (you probably thought they were hamburgers) are my feeble
attempt at closed eyes. In the closed position, they indicate
that the associated file list is inactive. In the open position
(only one may be open at a time), they indicate that the
associated file list is active. In this context, "active" means
that a scan may be in progress or already completed. To the
right of the "From" and "To" pathname gadgets are a couple of
upward pointing arrows. These gadgets attempt to obtain the
parent directory or device for the pathname currently displayed.
For example, if the "From" gadget is currently displaying the
pathname
DH0:Src/Lib
clicking on the arrow gadget will cause
DH0:Src
to be displayed, the file display box (big box at the bottom)
will be cleared and a new file scan will be started. You should
also note that the "eye" related to that gadget need not be open
for this behavior to occur.
The next string gadget (down) is labeled "Current File".
Once you have selected a directory and list of files and have
started processing them, the "Current File" gadget will display
the name of the file that is currently being processed.
Now we get to the good part. You see a big box with a white
border in the center of the screen, with a couple of gadgets to
the left named "All Files" and "Clear" and a skinny white box to
the right, filled with a white bar, right? This is the heart of
the file requester I mentioned earlier. You've probably used
similar file requesters before. Though I wrote original code for
this, I tip my hat to Charlie Smith (MicroSmiths) and Peter
daSilva for their pioneering in this area. I borrowed heavily
from their prior works. In discussing the operation of the file
requester, I will be referring back to the previously described
gadgets.
In order to do something here, you first have to select one
or more files to "do it to". This group of files is described by
the "From" list. You can start a scan for this list by entering
the desired starting path in the "From" pathname gadget and
hitting the RETURN key or by clicking on the associated eyeball.
If you have done this correctly, you should immediately note a
bustle of activity as the disk is searched and the screen is
updated. You should observe filenames appearing in the requester
display box and the white bar in the box next to it (we'll call
it the "slider") should start to shrink. Depending on the
starting path you entered into the "From" gadget, you might
notice that some of the filenames are displayed in white, while
others are displayed in red. Those displayed in white are simple
filenames, while those in red are the names of directories. If
you want a good illustration of this, select FONTS: or DEVS: as
the starting path. You should also note that the filenames
appear in unsorted order. They will remain unsorted until you
click on the slider.
Now let's discuss the interactive and interruptible nature
of the file requester. The normal human tendency is to start a
scan, then sit back until some indication is given that the scan
is complete, then start mucking with the list of files. Don't be
so polite! You can do just about anything, short of clicking on
those big boxes to the right (command buttons) that I haven't
described yet. To select a file, position the mouse pointer over
its name in the display box and click once. You should notice
that the filename is now displayed in reverse video. This means
that the file is selected. If you click the same file again
(after a short pause), the file will revert to normal video (the
unselected state - sort of like Rhode Island :-). If you wish to
select multiple files, depress the SHIFT key (either one) prior
to clicking the mouse. Otherwise, the previously selected
file(s) will be deselected. If you wish to select ALL files,
wait until the scan is complete, then click in the little box to
the right of the "All Files" gadget. To clear all file
selections, click in the little box to the right of the "Clear"
gadget.
You will notice that only 12 filenames can appear in the
display box at any time. By using the slider, you can
view/select other files in the list. You do this by "dragging"
the slider bar - click the mouse on it and, while holding the
mouse button down, drag the mouse pointer downward. When you let
up, other filenames should be revealed (depending upon how many
files are contained in the currently selected directory). The
size of the slider bar is proportional to the number of files in
the directory. If half of the files are visible, the bar will be
one-half the size of the slider box. Also, note that if a scan
is in progress, the file list will be resorted (case-insensitive)
each time you click on the slider.
To descend to deeper levels in the directory structure, you
can either type a new name in the "From" gadget (the hard way) or
you can double-click (two mouse clicks in rapid succession) any
of the red (directory name) entries visible in the display box.
A new scan will immediately be started even if the current scan
is not complete. To go back up the directory tree, click the
up-arrow gadget described earlier. Again, the current scan (if
active) will be abandoned and a new one started at the next
higher level.
The preceding discussion has focused on the behaviour of the
file requester when the "From" list is active. Though its
behaviour for the "To" list is similar, there are some strong
differences. First of all, the object of a "To" scan is to
select a target DIRECTORY (not a file). You will observe that
only directory pathnames appear in the display list when doing a
"To" scan. Also, extended selection (via SHIFT key or the "All
Files" gadget) is meaningless here and so it is not supported.
You just use the "To" scan to locate a target directory. Once
found, double-clicking on the directory name will cause it to be
added to the "To" pathname. The interruptible nature of the file
requester is also supported for this mode.
Before getting to the processing options (Soon, I promise!),
there is one other file requester behavior to note. If you start
a scan for one list, then start a scan for the other list before
the first one is complete, the partial results of the first scan
will be abandoned. If the scan is allowed to complete, you may
then activate the other list, do some navigating, then reactivate
the other list with its eyeball. It will be redisplayed
immediately without a re-scan. This may not be what you want,
especially if both "From" and "To" lists are on floppies. To
force a rescan, just position the mouse pointer into the
appropriate "From" or "To" pathname gadget and press the RETURN
key.
OK, let's get back to those labeled buttons on the right.
Those are the "command buttons" which tell MRBackup to start
performing specific processing on the files you have selected.
For all operations, the current file is displayed in the "Current
File" gadget (how appropriate!). If an error occurs that
MRBackup considers "tolerable", you will be prompted with a
requester that will give you the choice of continuing or
aborting. As each file is processed, its name is removed from
the list and the display box is refreshed. When processing is
complete, one of two things will happen. If there were errors,
the display box will be left displaying the names of the files
that were not processed. If all went well, a new scan will be
started for the "From" list. Please note that no support
currently exists for processing "nested" directories. Though you
are allowed to select directory entries, the utilities won't
descend to the next level and process files there. I hope to add
support for nested levels at a later date. The description of
the command buttons and their processing follows.
Compress
The selected files will be compressed, using the same
Lempel-Ziv method used by the Backup command. Unlike the Backup
command, however, files that don't compress properly are not
copied instead. The file date and comment are maintained. The
destination file will have the suffix ".Z" appended to its name.
Also - and this is important! - if the "From" and "To"
specifications are identical, the original file will be deleted
if the compression is successful. This is standard Unix compress
behavior which seems quite appropriate to me.
Decompress
The selected files will be decompressed. Note that only
files whose names end in ".Z" will be processed, regardless of
what may be in your selection list. It is a good idea to type
".Z" into the FileSpec gadget to limit visibility only to
compressed files. This will prevent confusion. The file date and
comment are maintained. Again, as with compress, if the "From"
and "To" specifications are the same, the original file will be
deleted after a successful decompression.
Copy
The selected files will be copied to the "To" directory,
which MUST BE DIFFERENT than the "From" directory. File dates
and comments are maintained.
Rename
The selected files are renamed (moved) to a new directory.
The "From" and "To" directories MUST BE DIFFERENT. Also note
that you cannot rename across device boundaries. If you wish to
do this, use a combination of the Copy and Delete operations.
Delete
The selected files are deleted. Period. Please be careful
with this as there is currently no "last chance" prompt prior to
the operation.
SetArcBit
The AmigaDOS "archive bit" will be set for all selected
files. This could be used to inhibit the backup of certain files
when the "Use Archive Bits" flag is set.
ClrArcBit
The AmigaDOS "archive bit" will be cleared for all selected
files. This would assure that certain files would be backed up
when the "Use Archive Bits" flag is set. Another use for this
operation is to "unmark" files that were marked as archived
during a failed backup operation. This would be done before the
"Resume Backup" command is used.
There's room for lots more stuff here, but the usual lack of
time keeps me from getting them in this release. I would like to
add a MakeDir command and possibly add an "Execute" command
button which would fire a command off to a CLI. Also nice would
be some running statistics (file count, bytes in/out, etc.)
during file processing. Support for nested directories is next
on the agenda. Please give me your feedback on your impressions
and any suggestions you might have.
Warranties and Support
There are no warranties, either expressed or implied, with
regard to the use of this program. You didn't pay for it (did
you?), so how's you gonna' get you money back (sic, sic, sic)?
Seriously, folk, I've tested this beastie pretty thoroughly (I
USE it!), but you know how things go. There may be a bugaboo or
two lurking about. Please exercise it a little before committing
your life (your precious data) to its care.
As for support, I will do my best to respond to bug reports
for as long as I have an Amiga in working condition. I will only
support the most recent version, so please know your version
number if you call.
Several people have suggested that I should have made this a
shareware product, if not a commercial one. I don't really think
that shareware works, and it really was not my intention to make
money with this program. I can see in retrospect, however, that
there was a need for such a utility and that with a little more
work (OK, a lot of work!), I could probably have had a minor
financial success. However, by my standards, that would have
required a lot more effort and commitment than I had to give at
the time. MRBackup will have to be a lot faster (and have more
features) to qualify as a commercial product. Your calls and
letters have been extremely gratifying and all the incentive I've
needed to continue to steal a couple hours here and there to
continue making improvements. If anyone wants to talk a deal for
some reasonably priced custom software, however, I'm all ears.
Surpisingly, several users of MRBackup have made monetary
contributions above the $2.00 I've asked for disk and postage. I
would like to publicly thank them by including their names in
this "MRBackup Roll of Honor" (order by amount contributed):
John Sauter, Merrimack, NH <-- From my home state!
Don Estok, USCG, Kodiak, AK <-- Classy letter, Don!
Milt Very, Oakdale, CA <-- Thanks, Very! (much)
Paul Coene, Rochester, NY
Tony Koen, Hutchinson, KS
Robert Farrel, Tivoli, NY
Ralph Watson, Chesterfield, SC
Ray Hulinsky, Lincoln, NE
Roll of honor members will receive special notice
(unsolicited/free updates, in some cases) of new MRBackup
releases and other PD stuff that I may find the time to write.
All MRBackup users will get a reasonable response to bug reports
and feature suggestions. You are not expected to contribute, and
I will not hold you in disregard if you call with a problem
though you are a non-contributing user - I'll be grateful.
Constructive user feedback is a programmer's best friend.
Permissions
This program is contributed to the public domain, as a token
of gratitude for the many wonderful programs I have received
through the same channels. Feel free to enhance, destroy, sell,
distribute or otherwise benefit from the legal use of this
program. I would love to hear from those of you who find MRBackup
either useful or useless (with specific criticisms in the latter
case). If you make any enhancements (there's room for PLENTY),
please share them with me and the rest of the world. I can be
reached as:
mrr@amanpt1.ZONE1.COM
...rayssd!galaxia!amanpt1!mrr
or
Mark R. Rinfret
348 Indian Avenue
Portsmouth, RI 02871
401-846-7639 (home)
401-849-8900 (work)
Changes
This section lists changes, in reverse chronological order,
as they have appeared in subsequent releases of MRBackup. I have
attempted to be thorough, but may have missed a few key items.
Version 2.4
Version 2.3 beta got very limited distribution and there was
no 2.4 beta. Just before I was ready to release 2.3, I got a few
crank phone calls (just kidding!) complaining about the
"compression/expansion thing". It seems that some files were
actually growing larger when MRBackup tried to compress them!
That sounds a lot like me when I go on a diet! Version 2.4 now
has logic to detect this condition and abort file compression
when it occurs. As I implemented this "reactive" solution, which
could be very costly, time-wise, if many files exhibited this
behavior, I realized that it would be nice to have a "preventive"
solution as well. The solution is a new support file,
MRBackup.cflt (or a name of your choosing) which specifies files
that are not to be compressed. Your responsibility is to name
files in a consistent manner that can be matched by a filename
pattern. Fair enough?
I got an e-mail message from C. Harald Koch at U. of
Toronto, requesting me to relax the requirement that the backup
path had to be the name of a disk device. He wanted to do
backups over an Ethernet link. I wish I had such "problems"!
I've honored the request and say "thanks" to "chk" for pushing me
into it. The backup path is now only required to be a disk
device name if the disk formatting option is enabled and you are
doing a backup. I've also relaxed the restrictions on the home
path.
If you've ever designated a disk file as the Listing Path,
you've probably gotten a non-fatal error which informed you that
the file could not be accessed. Of course not - it was open for
output. Past versions of MRBackup attempted to head off this
error but lacked the "smarts" to do it well. This version of
MRBackup converts your listing path specification into a fully
qualified pathname, then adds it to the Exclude Filter list. You
shouldn't get any more interruptions from this problem.
I've made some nice changes to Load Preferences and Save
Preferences. Save Preferences now generates comments interleaved
with your current settings. The comments explain the general
format of the file and each option line. Load Preferences (which
is automatically invoked when you start MRBackup) allows several
new special characters to indicate a comment line. It also
ignores leading blanks on any line. If you're replacing a
previous version of MRBackup, It is recommended that you use Save
Preferences immediately upon running MRBackup to generate a new
preferences file (MRBackup.init).
This version of MRBackup uses SIMPLE_REFRESH windows for all
but the Progress Window. This should cut down quite a bit on
chip RAM usage.
Bugs
The only known bug in this version of MRBackup is that you
will lose about 64 bytes of system memory with each invocation of
MRBackup. The problem is due to poor housekeeping on my part, I
assume, and I'm tracking down the problem but haven't nailed it
yet. I don't think it's serious enough to warrant a delay in the
release of this version.
There is a screen update anomoly which I'm not convinced is
MRBackup's fault. When running with DMouse, V1.09, I've noticed
that my windows occaisionally get trashed (they don't update
properly). I also noticed this with some WorkBench windows, so
I'm inclined to believe that DMouse might have something to do
with it. I haven't investigated the problem, but I believe that
there are options in DMouse which will correct the situation.
PLEASE! If you discover problems with MRBackup, let me
know! I want to know about and eliminate them as quickly as
possible, but your feedback is vital. When you're stealing a few
hours a week from a crowded schedule to hack on something like
this, there isn't a whole lot of time left for testing. I try to
be thorough but don't always succeed. Help me out!
Version 2.3 (beta)
The file decompression routine (invoked by the Restore
command) was not clearing its status variable. As a result,
prior errors detected by either file compression or decompression
would be picked up by subsequent decompression operations. This
bug has been eliminated.
The Save Preferences command was saving the Compress option
incorrectly. This is fixed in version 2.3.
The date routines used by MRBackup have undergone a thorough
overhaul. Special thanks to Thad Floryan for his DateStamp-to-
Julian date conversion algorithm. The previous lower limit of
03/01/84 has been removed.
The context saving routines (which support the Resume Backup
command) were working incorrectly in some cases. This problem
has been fixed.
A new Utilities menu has been added. This menu provides all
sorts of file maintenance services, including individual file
compression/decompression, copying, renaming, etc.
Bugs:
Compress will, on occaision, create a destination file which
is larger than the original. The last reported occurrence of
this was with IFF ILBM files (thanks, John Hopf). I haven't
investigated the problem yet. If I do fix it, it will probably
involve something like this:
Compress the file
Is it bigger? -> yes -> Delete and copy
This could get quite time consuming for a large run of files
which exhibit this behavior. One alternative would be to have a
list of "compression excludes", similar to the current exclusion
list. All files matching the specifications in the list would
not be compressed. Another approach would be to insert sampling
code in the compression routine which would be smart enough to
decide early on in the compression that things were not going
well. I'm thinking...
Version 2.2
MRBackup now searches the current directory for
MRBackup.init upon startup. This allows you to have custom
backup preferences for separate projects which are automatically
found if you start MRBackup using the CLI interface from the
directory containing the file MRBackup.init.
Prior to this release, the specification of a new listing
path caused the listing to be immediately rewritten. This was
not a GOOD THING since your old listing file could be destroyed
before you got a chance to select a new name. Now, MRBackup uses
append access when testing the listing pathname for
accessibility. It still rewrites the file once the backup has
started, however.
I've added a few more messages to greet you when MRBackup is
first started.
Most people who have had trouble with MRBackup did not
understand the purpose of the file change delta date ("since
date") requested when a backup was started. They typically would
let it default, then not understand why more files weren't backed
up. I have changed the default to include all files. This is
probably more useful, especially with the new archive bits
feature.
Version 2.1
Added the "archive bits" capability.
Fixed an error in the file exclusion list processing
algorithm. While this problem seems to have drawn little
attention, the previous algorithm did not properly handle file
specifications involving nested directory components.
File comments and protection bits now are saved/restored
along with the file date.
A new command, Resume Backup, plus a new method for saving
"context" information, has been implemented.
Version 2.0
New User Interface
MRBackup has undergone a major facelift. It now has its own
screen and color palette and newly designed menus and gadgetry.
All of this is due to my use of PowerWindows 2.0 from
Inovatronics, a very worthwhile tool for Intuition programming.
You will notice some new gadgetry on the screen. I've added
a "fuel gauge" which indicates the "fullness" of the output
floppy. There's a new error count gadget which tracks total
errors encountered and a "Current Backup Volume Name" gadget
which keeps you informed as to which disk you're currently
archiving to or restoring from.
The Pathname Specifications window has a close box which
will make the window go away. A new menu, Windows, has an item
Pathnames which will reopen the window for you.
A new command, Save Preferences, allows you to save your
current pathname specs and flags to the preferences file
(S:MRBackup.init). The Flags menu has been totally redone. This
menu previously consisted of item pairs (<feature>/No <feature> -
pretty dumb, I must admit - I think I was intrigued by mutual
exclusion at the time). The new Flags menu just consists of
check-marked items. If an item is checked, the feature is
enabled.
Improved Error Handling
This is usually the hardest task in any programming chore
and usually gets the least attention. Previous versions of
MRBackup were no exception. Version 2.0, however, has come a long
way in this direction, especially in the area of recoverability.
A new requester has been introduced which lists your recovery (or
abort) options when certain errors have been detected. Most
significantly, new context-saving code has been added which will
allow you to restart a backup disk from its beginning, should a
non-recoverable output error occur. Currently, this context
information is saved in memory. I would like to save it to a file
on the system disk. This, coupled with
a new command (Resume Backup), would allow recovery even from a
power failure.
Increased Flexibility
Previous versions of MRBackup were fairly rigid with regard
to home and backup path specifications. Version 2.0 allows ANY
disk device to be referenced in either location. On systems with
dual floppy disks, you can even backup from floppy to floppy!
MRBackup now allows you to suppress formatting of the backup
disk. This allows you to "freshen" a previously created backup
set. Though this option should be used with care, it does speed
things up and enhances MRBackup's partial backup capability.
Big File Handling
This is truly a last-minute item! I personally don't have a
file big enough to require this, so I didn't address the problem
initially. However, enough users have requested this that I took
a stab at it. "Big" files, according to MRBackup, are files which
are larger than the formatted capacity of the output media. Iff
(sic) you enable the "Do Big Files" and "Format Destination" Flag
menu items, MRBackup will split big files across multiple floppy
disks. If these options are not enabled, MRBackup will just
complain that the file is too big to back up and go on.
Some of you will probably think that the method used to do
this is somewhat kludgy, but it's consistent with my approach to
total AmigaDOS compatibility. When backing up a big file, a
special information file, MRBackup.bigfile, is written to the
output disk. The information file contains stuff like the file
name, the "chunk number" (which piece of the file is this?), the
chunk size, and a flag which indicates whether this is the last
chunk. This information is used by the restore operation to
insure that the file chunks get reassembled in the correct order.
In order to test this, I had to write a program to create a
big file (slightly larger than 1 floppy disk), archive it and
restore it, then compare the two files. To do all this, I had to
first clean house on my 20 MB hard drive! The big file backup
appears to work OK. I think it could use some more testing,
however, and would encourage you to test drive it before you
commit to it.
Index
"All Files" gadget . . . . . . . . . . . . . . . . . . . 12, 13
"Clear" gadget . . . . . . . . . . . . . . . . . . . . . 12, 13
"Current File" gadget . . . . . . . . . . . . . . . . . . 12, 14
"From" gadget . . . . . . . . . . . . . . . . . . . . . . . . 12
"NOW" gadget . . . . . . . . . . . . . . . . . . . . . . . . . 6
"To" gadget . . . . . . . . . . . . . . . . . . . . . . . . . 12
Archive bit . . . . . . . . . . . . . . . . . . . . . . . 10, 15
archive bits . . . . . . . . . . . . . . . . . . . . . . . . . 2
Arrow gadget . . . . . . . . . . . . . . . . . . . . . . . . 12
Backing Up a Disk . . . . . . . . . . . . . . . . . . . . . . . 5
Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Backup Path . . . . . . . . . . . . . . . . . . . . . 3, 5, 6, 7
Big files . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Chunk number . . . . . . . . . . . . . . . . . . . . . . . . 23
Chunk size . . . . . . . . . . . . . . . . . . . . . . . . . 23
Command buttons . . . . . . . . . . . . . . . . . . . . . 13, 14
Comment lines . . . . . . . . . . . . . . . . . . . . . . . . . 4
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Compress . . . . . . . . . . . . . . . . . . . . . . . . 11, 14
Compress Files . . . . . . . . . . . . . . . . . . . . . . . . 9
Compression . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Creation/modification date . . . . . . . . . . . . . . . . . . 7
Date and time format . . . . . . . . . . . . . . . . . . . . . 6
Date requester . . . . . . . . . . . . . . . . . . . . . . . . 6
Decompress . . . . . . . . . . . . . . . . . . . . . . . 11, 15
Decompression . . . . . . . . . . . . . . . . . . . . . . . . . 2
Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Disk sequence number . . . . . . . . . . . . . . . . . . . . . 8
Do Big Files . . . . . . . . . . . . . . . . . . . . . . . . . 9
Exclude file . . . . . . . . . . . . . . . . . . . . . . . . . 3
Exclude Path . . . . . . . . . . . . . . . . . . . . . . . . . 3
Extended selection . . . . . . . . . . . . . . . . . . . . . 11
File display box . . . . . . . . . . . . . . . . . . . . . . 12
File requester . . . . . . . . . . . . . . . . . . . . . . . 12
FileSpec . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Flags Menu . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Format Destination . . . . . . . . . . . . . . . . . . . . 9, 10
Generate Listing . . . . . . . . . . . . . . . . . . . . . . 10
Home Path . . . . . . . . . . . . . . . . . . . . . . . . 3, 6, 7
Initialization file . . . . . . . . . . . . . . . . . . . . . . 4
Initialization parameters . . . . . . . . . . . . . . . . . . . 8
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
Lempel-Ziv . . . . . . . . . . . . . . . . . . . . . . . . . 14
Listing Path . . . . . . . . . . . . . . . . . . . . . 3, 6, 10
Load Preferences . . . . . . . . . . . . . . . . . . . . . . . 8
Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
MRBackup Roll of Honor . . . . . . . . . . . . . . . . . . . 17
MRBackup Utilities . . . . . . . . . . . . . . . . . . . . . 11
MRBackup.bigfile . . . . . . . . . . . . . . . . . . . . . 9, 23
MRBackup.context . . . . . . . . . . . . . . . . . . . . . . . 8
MRBackup.init . . . . . . . . . . . . . . . . . . . . . . . 4, 8
MRBackup.xcld . . . . . . . . . . . . . . . . . . . . . . . . . 3
Operations Menu . . . . . . . . . . . . . . . . . . . . . . . . 8
Parent directory . . . . . . . . . . . . . . . . . . . . . . 12
Pathname Specification . . . . . . . . . . . . . . . . . . . 10
Pathname Specifications . . . . . . . . . . . . . . . 3, 6, 8, 10
Permissions . . . . . . . . . . . . . . . . . . . . . . . . . 18
Preferences . . . . . . . . . . . . . . . . . . . . . . . . 4, 8
Protection . . . . . . . . . . . . . . . . . . . . . . . . . 10
Protection bits . . . . . . . . . . . . . . . . . . . . . . . . 7
Quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Rename . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Restore . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 8
Restoring the Backups . . . . . . . . . . . . . . . . . . . . . 7
Resume Backup . . . . . . . . . . . . . . . . . . . . . . . 8, 15
Save Preferences . . . . . . . . . . . . . . . . . . . . . . . 8
Select multiple files . . . . . . . . . . . . . . . . . . . . 13
Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Slider . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Speak . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
STOP gadget . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Up-arrow gadget . . . . . . . . . . . . . . . . . . . . . . . 14
Use Archive Bits . . . . . . . . . . . . . . . . . . . . . . 10
Utilities . . . . . . . . . . . . . . . . . . . . . . . . . 9, 11
Utilities Operation . . . . . . . . . . . . . . . . . . . . . 11
Volume names . . . . . . . . . . . . . . . . . . . . . . . . . 7
Warranties and Support . . . . . . . . . . . . . . . . . . . 17
Windows Menu . . . . . . . . . . . . . . . . . . . . . . . . 10
Yesterday . . . . . . . . . . . . . . . . . . . . . . . . . . . 6