guido@boring.UUCP (07/26/85)
What follows is the documentation for a utility I have written for the Macintosh/XL. This is available for free from me in binhex 4.0 form; mail me if you want a copy. I'm not yet posting the binhex'ed program to the net as I'm sure that there will be several improvements after I've received the first user's comments, and I don't want to clutter up the net with bugfixes. Also, I don't know if there is general interest in such a program, so the feedback by mail will indicate if there is any reason to post it at all. (You can ask for more features or clarification of the document, too!) Guido van Rossum, CWI, Amsterdam Send mail to: ...!{decvax,philabs,seismo}!mcvax!guido ------------------------------------------------------------------------------- Hard Disk Backup Utility version 0.9 Guido van Rossum CWI, Amsterdam July 1985 This program allows the user of a Macintosh/XL* (Lisa* with Macintosh operating system) to make a backup of the hard disk on a series of standard diskettes. The program facilitates regularly backing up the disk by grouping the files on the diskettes in such a way that (almost) a minimal number of diskettes is required, and by allowing an "incremental dump" to be made, where only the files that have been changed since the last backup was made are dumped. This make it practical to back up a 10JMb hard disk dayly. The programs operates with two windows, which are shown after each other. The first window allows the dump parameters to be chosen, the second window shows status while the actual dump is being made. First window ============ When started, the program shows a window which displays vital information about the volume to be dumped: its name, the number of files on it, free and used space (in kilobytes), and the date when the last (full or partial) backup was made. [Drive] If there is more than one volume mounted, the Drive button can be used to choose the volume to be dumped. Normally, this button is dimmed. (Note that this allows one to choose a diskette as the volume to be dumped; this is unwise.) Below, it displays the selected dump mode (full or incremental), the number of files that have to be dumped, and an approximation of the required number of diskettes. (*) Full dump ( ) Incremental dump With radio buttons the user can select the dump type; the default is incremental when the date of the last dump has been recorded, and full otherwise. At the bottom of the window are three buttons. [Start] [Cancel] [Help] The user has the following options to proceed: * Start accepts the parameters as they are currently displayed and starts making the dump; * Cancel terminates the operation of the program immediately; * Help brings up a window showing a summary of the program's operation. Pressing the Return or Enter key is equivalent to Start. Second window ============= The second window asks the user to insert the backup diskettes, one by one, and displays what's going on while the files are being copied. It is possible to give a diskette a new name by typing in the box that displays the name. Also, there are the following buttons in the window. [ Quit ] [Start] [Eject] [Cancel] * Start starts dumping files to the diskette until it's full, then ejects it and asks for another one; * Eject ejects the inserted diskette immediately and asks for another; it can be used when the wrong diskette has been inserted; * Cancel is only active while files are being dumped and can be used to stop writing on the disk (but files that have already been dumped to it will not be dumped again to another diskette); * Quit should not be used normally; it quits from the program without recording the last backup date. In this stage, several alerts can come up to warn about unusual situations: * "That disk is locked. Please insert an unlocked disk." Speaks for itself; the write-protect notch in the diskette is open. * "This disk is not empty. Do you want me to erase it completely?" Select Erase to delete all files, Eject if you want to use another disk instead. * "I/O Error" (plus detailed information). A file system call unexpectedly returned an error. There can be various reasons for this. Perhaps a bad sector on the diskette is the most probably cause; this is shown as "Disk I/O error". Dumping to the current diskette is abandoned, and an attempt will be made to dump the file again to another diskette. (When the error is caused by a bad sector on the hard disk, attempts will be made to dump the same file forever. If this happens, quit from the backup program and delete the file.) * 'Sorry, memory exhausted." This is a fatal condition; run the program with more memory available (this can only happen when the program is run under the Switcher with a very small memory partition). Restoring the hard disk from a backup ===================================== There is currently no "companion program" that can be used to ease restoring the files that have been dumped. However, each backup diskette has the entire folder structure of the hard disk written onto it, and files appear in the appropriate folders, so with the Finder it should not be too difficult to copy the files back manually by dragging them from the backup diskette to the hard disk. Be careful not to drag whole folders though: when the destination folder already exists the Finder will delete all files that are already in it (if Yes is answered to the question "Replace items of same name?"). When a full dump and several incremental dumps must be restored, it is best to restore the files in reverse chronological order, starting with the last incremental dump and ending with the full dump, never restoring a file that has already been restored. This strategy never copies the same file twice, and also avoids problems with locked files. (This only works when the hard disk is initially empty.) Bugs and caveats ================ * For incremental dumps, a file is dumped based on its date of last modification. This means that if you copy old files from other diskettes, they may not be dumped, because the copy has the same modification and creation date as the original. * Files that don't fit on a single diskette will never be dumped. Moreover, they prevent the dump process ever to finish, so you have to use the Quit button. * The DeskTop file is copied to each backup diskette. This wastes about 5% of the disk space on the diskette (but helps with restoring files manually). * You can fool the program by dumping to the same diskette twice. Don't do this! * There is no way to find out what files have been dumped most recently to which diskettes, so to reload a particular file after you've stupidly lost it might take some time. (You can use the Finder's print directory to get a printed overview of all diskettes, though.) Macintosh and Lisa are trademarks of Apple Computer. This document copyright (c) 1985 by Stichting Mathematisch Centrum, Amsterdam, The Netherlands. All rights reserved. Permission to copy is given provided that the copy is not sold and this copyright notice is included.