home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d128
/
mrbackup.lha
/
MRBackup
/
MRBackup.TXT
< prev
next >
Wrap
Text File
|
1988-01-02
|
14KB
|
397 lines
MRBackup Version 1.3
A Hard Disk Backup Utility
for the
Commodore Amiga
24 September 1987
Author: Mark R. Rinfret
Introduction
This document describes a program which will back up an
Amiga hard disk drive to floppy disk media. It also represents
the author's first serious (are you kidding?) attempt to write an
Amiga program with an Intuition-based user interface.
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. Just for fun, MRBackup also talks. Though this is mostly
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.
The user should take a serious and organized approach to his
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). One shortcoming(?) of the
current version of MRBackup is that all directory nodes from the
specified home path and down are preserved on the backup media,
even if some of those nodes have no files eligible for backup by
way of the backup date. Perhaps a later version of this program
will address this issue.
MRBackup attempts to economize on output media usage by
using 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 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 and a couple of embedded windows. 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 hard disk pathname and "Backup Path" always refers
to the floppy disk pathname. The "Listing Path" refers to the
destination of a detailed listing of the contents of the backup
floppies and may specify the printer (default) or a file on the
hard disk. The listing is an option which may be
enabled/disabled via menu selection. The "Exclude Path", if
specified, is the name of a file which contains a list of file
specifications, with possible Unix-style wildcard content, which
are checked during backup against the names of files about to be
backed up. Any filename matching an entry in this list will be
excluded from the backup. The exclude file 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. Examples:
# Exclude all object files
*.o
# Exclude all files beginning with "System":
system*
# Exclude all ".info" files:
*.info
# Exlude the "include" directory and all subdirectories:
include
You can customize the operation of MRBackup through the use
of an initialization file. This file must be named
S:MRBackup.init. With it, you may set your desired defaults and
Flags. Each line in the file consists of an option setting, of
the form:
OPTION = VALUE
or a comment. Comment lines begin with a number/pound/libra sign
(#). A sample initialization file is included which illustrates
the use of all possible parameter settings.
Backing Up a Disk
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.
Once your floppies are ready and stacked neatly within
reach, the fun begins. First, modify the pathname specifications
according to your requirements. The "Home Path" may include
device names DH0..DH9 (depending upon your configuration) and may
optionally specify a directory component, as well. If only the
device name is specified, all files on the drive will be backed
up. If a directory is specified, the backup will be limited to
all files and subdirectories at or below that level. The backup
path should be the DEVICE name of one of your floppy drives
(DF0..DF3 are the allowed values here). 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 set the
No 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 one day earlier than the current date. 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 date
value of 00/00/00 or a null string is allowed should you want to
backup all files in the home path, regardless of their creation
dates. Otherwise, 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). I just didn't feel the extra logic was worth it (I got
lazy).
Once the date has been entered, the rest is fairly
automatic. You will be prompted immediately for a blank 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 only checked prior to the start of the next file
copy operation, so be patient if it does not respond immediately.
As each floppy disk is filled, you should promptly label it.
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 (I wish they were distinct)
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 all the windows 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
you allow it) 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.
Warranties
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 you gonna' get you money back? Seriously, folk,
I've tested this beastie fairly thoroughly (I intend to USE it!),
but you know how things go...there may be a bugaboo or two
lurking in there. Please exercise it a little before committing
your life (your precious data) to its care.
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 this
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:
mark@unisec.USI.COM (at least a couple more months)
or
Mark R. Rinfret
348 Indian Avenue
Portsmouth, RI 02871
401-846-7639 (home)
401-849-4174 (work)