home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
201.lha
/
Backup.DOC
< prev
next >
Wrap
Text File
|
1988-12-27
|
15KB
|
289 lines
Backup 1.0
Program and documentation by
Jimbo Barber
P.O. Box 3414
Clearwater, Florida 34630
(813) 441-8402
What Backup is NOT:
Backup is NOT a hard disk backup utility. Just wanted to
get that straight.
What Backup IS:
Backup is a utility that allows you to automatically (and
unattended) backup from 1 to 25 individual files from any
AmigaDOS device to any other device, including hard drives and
RAM disks. It also allows you to specify the amount of time
between backups, from 1 minute to over 16 hours. You may also
specify the amount of memory to be used for the copy buffer, from
1K to over 1 megabyte. Backup makes full use of the Amiga
Intuition (windows, pull-down menus, gadgets, etc), and even
displays the amount of time remaining until the next backup.
What is Backup used for?
Backup was designed specifically for Bulletin Board System
(BBS) Sysops. It allows a Sysop to put message base files, user
files, and any other files into RAM, for maximum speed. Backup
will then copy these files from RAM back onto disk for safe
keeping. It performs this backup completely unattended, and at
time intervals that you specify. This program is a must for
floppy based BBS systems, because running from floppy means a
painfully slow message base. It is also very useful for BBS's
run from hard drives. A RAM based message base will always be
faster than even the fastest hard drive, and this program can
save a GREAT deal of wear and tear. Instead of the hard drive
constantly reading and writing, it only writes when the Backup
program copies the message base from RAM back to disk.
Very few (if any) Sysops currently place the message base in
RAM, simply because if the power goes out, all new messages will
be lost. Backup takes care of that worry by copying the entire
message base back to disk as often as you like. Backup runs
unattended, 24 hours a day, just like your BBS, making sure your
important information is safely on disk.
Is Backup only for BBS's?
Not at all. Backup is for anyone who needs automatic file
backup over a period of time. You specify the files to backup,
and you specify where they are coming from and going to. Maybe
you are a SuperBase user who likes to keep your database in RAM
for quick access? A power outage or GURU after a couple of hours
work would not be fun. Let Backup copy your database files back
to disk automatically every ten or fifteen minutes. If you have
a need for automatic backup of individual files, this is the
program for you.
Who thought up this great program?
I must give credit where credit is due. I actually wrote
the program, but the original program idea came from Bill Ott of
St. Petersburg, Florida. He runs a BBS entirely from floppies,
and wanted to safely put the message base and user files in RAM.
This program is the result. I also extend to him special thanks
for beta testing the program for me at various stages. For those
who are curious, Backup is written entirely in Benchmark
Modula-2. Definitely the fastest development system around.
So, how does this marvel of modern computer science work?
Ah, now down to the heart of the matter. Backup consist of
a single program file, called Backup. Place this file on
whatever disk you wish to use it from. Placing it in the c
directory is a good idea, so the operating system can find it no
matter what your default directory is. There is also an icon
included, for those who use the Workbench.
I suggest you always RUN Backup from the CLI (or just double
click from Workbench)-->(Example: 1> run Backup) Backup will
then open a small window on the top left corner of your display,
and show the minutes remaining until the next backup occurs. If
run from Workbench, Backup will open another small window for any
messages it may give. At this point you haven't defined anything
yet, so it is using the defaults of a 30 minute backup cycle, a
30K buffer, and no files to backup (so it actually won't do
anything if you let the clock run all the way down). You may
also notice that the CLI you ran Backup from now says "Unable to
open BACKUP.DAT data file. I will create a new one." Backup
creates a data file in the current directory called BACKUP.DAT,
which holds all the backup information (filenames, buffer size,
etc). You will only see this message the first time you run
Backup, or if you delete the BACKUP.DAT data file. More on the
BACKUP.DAT file later.
So you now have the Backup window with a countdown started.
Click on the window to make sure it is active (not on the close
gadget or front-to-back gadgets, please!). Now press the right
mouse button and you should see a pull-down menu. On this menu
you have the choices "About Backup", "Preferences" and "Quit".
"About Backup" will bring up a large window in the center of your
screen with the credits. The graphic you see here may look
bizarre, because it is using your workbench colors. I decided
not to change them while this window is open because I didn't
want to make everything else around it look bizarre.
"Preferences" lets you tell Backup how to do its work. When you
choose this menu option, a large window will open in the middle
of the screen. You will see numerous gadgets here for entering
numbers and characters. There is something very important you
must remember: Whenever you type in one of these gadgets (either
in an empty gadget or editing existing information), you MUST
press RETURN when you are finished. If you don't press RETURN
before leaving the gadget, the new information will not be saved.
Always press RETURN after entering information into a gadget.
Now let's run through all the "Preferences" options. The top
gadget (which will have a default of 30 the first time you run
the program) is the amount of time (in minutes) between backups.
You may enter any value from 1 to 999 (a little over 16.5 hours).
If using Backup with a BBS, a delay of 30-45 minutes is a good
choice. The average BBS user will normally be on the system at
least that long, so more frequent backups are not really
necessary. Feel free to experiment though, and see what is best
for your system.
The next gadget down allows you to specify the size of the copy
buffer in K's (thousands of bytes). For example, the default
value is 30, so the copy buffer will be 30K or 30*1024 = 30720
bytes. You may enter any value from 1K (1024 bytes) to 999K
(over 1 megabyte). The higher the buffer size, the faster the
backup. You do not have to worry about running out of memory
when the backup starts. If you don't have as much free memory as
you've specified, the program will try to allocate half as much.
If there still isn't enough free memory, the program will try to
allocate half as much again, all the way down to a mere 512
bytes. If Backup can't get 512 bytes free, it will abort the
process and return to the CLI. Point is, feel free to specify a
large buffer if you wish. The program will handle it if it can't
find that much memory. Keep in mind that a large buffer probably
won't make that much difference if the source file is in RAM.
Data is read so quickly from RAM that a large buffer makes little
difference. If the source file is on disk though, a large buffer
speeds things up greatly.
Next is the DELETE gadget. This button deletes the filename,
source device, and destination device currently displayed below
it. This is useful when you've been using a certain setup for
awhile, and decide there is a file you no longer want backed up.
Simply get that file in the gadgets and click DELETE.
Beside DELETE is the number of the current filename being
entered/edited, and PLUS/MINUS buttons. Clicking the PLUS and
MINUS buttons will let you rotate through the filenames you've
entered. After entering all the files you want backed up, it is
a good idea to use the PLUS and MINUS buttons to rotate through
them all one last time to check for errors. If you see a
filename or other piece of information is not as you entered it,
then you probably forgot to press RETURN! Remember, always press
RETURN after entering information into a gadget. Also, don't
worry about empty file records as you DELETE entries or browse
with the PLUS/MINUS buttons. The information will be packed
together by the program. For example, say you enter information
at file record one, and then use the PLUS key to skip up to file
record nine and enter information. The next time you enter
"Preferences", the two file records will be together in spaces
one and two.
Next are the filename, source device, and destination device
gadgets. ALL THREE OF THESE MUST BE FILLED IN AT THE SAME TIME!
There always has to be three pieces of information for every file
you want backed up. If you enter a filename, then there MUST be
a source device and a destination device. Always remember to
press RETURN after entering information in these gadgets. If you
leave any one of these blank while entering information in the
other two, things will really get messed up and you'll probably
have to delete the BACKUP.DAT file and start again. Filenames
and device names can be upper or lower case, and follow the
standard AmigaDOS format. You can enter path names if you wish,
as long as they fit in the 14 character limit of the source and
destination device gadgets. Be very careful to enter filenames
correctly here. You can NOT use spaces in filenames, but you can
use special characters like the underline. If you do enter a
filename incorrectly, AmigaDOS will generate an error when the
program starts its first backup, and Backup will abort with an
error message. You will have to run the Backup program again and
correct the error.
There are three ways to exit the "Preferences" window. CANCEL
loses any changes you have made. Both DONE and the normal window
close gadget (top left corner of window) will save your changes
in the BACKUP.DAT file and close the window.
The BACKUP.DAT file is the real heart of the Backup program. It
is created the first time you run the program, and is updated
each time you leave "Preferences" (unless you choose CANCEL, of
course). It contains all the information in "Preferences", so
you don't need to type it all in again each time you run the
program. Backup looks for it on startup, and uses the
information there if found. This way, you only need to specify
all the backup information once (filenames, buffer size, etc),
and Backup will start up ready to go from then on. The
information in the BACKUP.DAT file is in standard ASCII format,
and may be edited with a word processor, text editor, or even ED
from the CLI. If you edit BACKUP.DAT as an ASCII file, the
format of the data will be quite apparent, because it follows the
same format in which it is displayed in the "Preferences" window.
Just make sure you don't change the format when editing. You can
also edit all the information by entering "Preferences" and
changing it. The choice is yours.
The last pull-down menu option is "Quit". The window close
gadget in the top left corner of the main Backup window (the one
with the countdown timer) has the same effect as "Quit". When
you exit the program, it will do the specified backup one last
time. This is to ensure that a recent backup has occurred.
IMPORTANT: If the program encounters any error it can't handle
(not enough memory, filename incorrect, etc), it will abort
completely (stop running and return to the CLI). You will know
this happens because the main Backup window will disappear. It
will also print an error message in the CLI that starts with
"Backup message:" and more or less explains the problem. If the
error message says something about source or destination, then
odds are that a filename you've given is either incorrect or not
where you said it would be. If an AmigaDOS requestor pops up and
says "Insert volume (whatever) in any drive", then you have an
error in the source or destination specification.
A few hints, tips, and reminders:
* Always press RETURN after entering or editing information
in a gadget.
* Use the PLUS/MINUS gadgets in the "Preferences" window to
check your work after entering the file information.
* If you get totally fouled up editing in the "Preferences"
window, exit the program, delete the BACKUP.DAT file, and run the
program again to start over.
* After entering all the file information for the first
time, change the amount of time between backups to something very
small, like one or two minutes. Then you won't have to wait very
long to see if all the information has been entered correctly.
Once it completes one backup, you can then enter "Preferences"
again and reset the time to whatever you choose.
* BBS Sysops, there are two things to keep in mind. 1) If
your message base is in RAM, and you use Backup to copy it back
to disk, then there is always a chance that you will lose some
messages if you have a power outage. The messages lost will be
from the last automatic backup until the power outage. However,
if you keep the backup time between 30-45 minutes, you run the
risk of losing very little (normally just the messages of a
single user). 2) The risk is very slim indeed, but it is always
possible that you might experience a power outage WHILE the
Backup program is writing the message base to the disk. If this
happens, you lose both the message base in RAM, and the one on
disk (since it was in the middle of being written). Therefore,
it is VERY important that you still make a complete backup of
your BBS (or maybe just the files being backed up) at least once
a week to different diskettes. This will prevent you from losing
everything. Keep in mind though, that the odds of this happening
are very small. The most important point of all is that both
these risks are well worth it for the incredible SPEED your BBS
will have! There's just no message base like a message base in
RAM. Even if you already run from a hard drive, your users will
really notice the difference!
* If you will be using this program to backup a BBS, you
will probably need expansion memory (more than 512K). The Backup
program itself doesn't require much memory, but having a message
base of any size in RAM will. Therefore, I suggest you have 1
meg of RAM or more before attempting to run a RAM based BBS.