ABackup - User's Manual 1. Foreword This manual describes release 1.31 of the utility ABackup. This program is public domain, and permission is granted to freely copy and distribute it on and/or by all mediums, provided no charge or fee is asked for, and no modification is done to this program. ABackup is copyright (c)1992 by Denis GOUNELLE : any commercial usage or selling of this program without author's written authorization is STRICTLY FORBIDDEN. In spite of several tests, no warranty is made that there's no error in ABackup. YOU USE THIS PROGRAM AT YOUR OWN RISKS. In no event will I be liable for any damage, direct or indirect, resulting of the use of ABackup. 2. Introduction ABackup is a backup program written for the Amiga. It works the same under 2.04 and 1.3 system releases, can be used both to make a backup of your hard disk or to archive files, and has a full Intuition interface. Also, ABackup is able to manage high density disks (some A3000 have a HD disk drive capable of storing 1.76 Mb on a HD 3"1/2 floppy disk, Kickstart 37.175 or greater is required). This program is SHAREWARE. If you find it useful, I invite you to send me FF 50 or $10 (cash or cheque in French Francs drawn on an European bank) at the address listed below in order to become a registered user. You will receive the next version as soon as it will be available. Suggestions and/or criticisms will be always welcome. Don't hesitate to write me at the following address : M. GOUNELLE Denis Boite 71 6, rue des cailloux 92110 CLICHY - FRANCE Thanks to Jean-Philippe RAPP for his numerous suggestions and constant supporting. Also thanks to Michel SCHINZ (without him this program would be still only at the planning stage) and Jean-Yves PROUX for their suggestions. The SendPacket() function is inspired of the source file of "touch.c" by P. Lindsay and A. Finkel (copyright 1986 Commodore-Amiga Inc.). 3. Getting started ABackup can be run as well from CLI as from Workbench. From the CLI, you can invoke ABackup by a syntax as follows : ABackup [-wbuf] [directory] The -w option allows to change the size of the read buffer : for example -w64 asks for a 64 Kb buffer. By default, the buffer size is 4 Kb large. You can specify a directory name for backup; by default, this one will be the current directory. From the Workbench, you can change the size of the read buffer by adding a line of the form "BUFSIZE=" in the "TOOL TYPES" field of ABackup icon. When the program starts, a screen is displayed with three gadgets in it : "Backup", "Restore", "Quit". Click on the gadget that matches the wanted action. 4. Requesters When using ABackup, often you'll see requesters with one message and one or two gadgets ("Ok", "Continue/Abort", "Yes/No"). In any case, you can reply to a request by clicking on one of these gadgets, or by pressing the key corresponding to the first letter of a reply (for example, the "c" or "C" key for "Continue"). You can also press for a positive reply ("Ok", "Continue", "Yes") or for a negative reply ("Abort", "No"). Finally, when a requester message asks for inserting a disk in one drive, inserting a disk in this drive will be detected and this will be equivalent to clicking on the "Continue" gadget. 5. Backup A requester is displayed that allows to choose the directory to backup. By clicking on the "Cancel" gadget, ABackup will return to the main screen. By clicking on the "OK" gadget, ABackup will load the directory contents. For breaking this loading, click on the "Abort" gadget or press one of the following keys : "a", "A", . As directory contents is loaded, the selection screen is displayed. This screen consists of a gadgets set and a bottom area where are displayed files and subdirectories of the current directory. At the start, no file and no directory are selected. Files are displayed in black on grey background, and directories in white on grey. You can scroll the list display by means of the vertical scroll bar on the right. The name of the current directory is displayed in the area named "Directory". The number and size of the selected files are displayed in the area named "Selection". For selecting a file in a list, click on the name of this file : it is displayed in black on a blue background and the "Selection" area is updated. If you click on a selected file, this one will be unselected. For selecting or unselecting a set of files, click on the first file and keep down the left button while moving your mouse. Last, to view a file, just double-click on its name (see below for details). When you click on a directory name, two actions can happen. If this directory is empty, it will be selected or unselected as a file. Otherwise, the list display will be modified in order to make visible the contents of this directory. The "Directory" area will be updated. To go back to the previous directory, you can either click on the "Parent" gadget (at the top of the scroll bar), either click on the hidden gadget between the left border of the screen and the left border of the display area. If you went very down in the tree structure, you can go back straight at the initial directory by clicking on the "Root" gadget (at the top of the scroll bar). At the top of the screen, there are two rows of identical gadgets. These ones allow to select (first row) or to unselect (second row) files and/or subdirectories in a global way according to various criterions : All Selects or unselects all files and subdirectories from the current directory. By name Selects or unselects files and subdirectories according to a name or a pattern. A pattern is a name with one of the special AmigaDOS characters: '#' or '?' under 1.3 system release, '#', '?', '|', '~', '%', parenthesis, or brackets under 2.04 system release. For more informations, refer to your AmigaDOS User's manual. A window is displayed with a string gadget. Type in it a name or a pattern and validate your choice by pressing . Now, click either on the "==" gadget, if you want files or subdirectories whose name matches the name or the pattern you typed, either on the "!=" gadget, if you want files or subdirectories whose name doesn't match the name or pattern you typed. You can cancel this operation by clicking on the window close gadget. By date Selects or unselects files and subdirectories according to the date of the last change. A window is brought up with a string gadget. Type in a date and/or time respecting the following syntax : DD-MM-YY or DD-MMM-YY for the date (for example, "01-03-92" or "01-Mar-92"), and HH:MM:SS for time. Validate your choice by pressing the key, then click over the "<=" gadget or the ">=" gagdet, according as you want to get earlier files and subdirectories or later ones in relation to the typed date. If you typed only time, the date will be the day date. If you typed only a date, time will be "23:59:59", when you click over "<=", or "00:00:00", when you click over ">=". You can cancel this operation by clicking on the window close gadget. By bits Selects or unselects files and subdirectories according to their protection bit. A window is brought up with a string gadget. For testing one or several bits (see the AmigaDOS command "Protect"), type them in this gadget and validate your choice by pressing the key. Click now over the "= 1" or "= 0" gadget according as you want files and subdirectories with their bits set or unset. You can cancel this operation by clicking on the window close gadget. Far right on the selection screen, there are two more gadgets. The "Reverse" gadget allows to invert a selection : all selected files become unselected and all unselected files become selected. The "Recursive" gadget controls the action of the "Reverse" gadget, just as it controls the "All", "By name", "By date" and "By bits" gadgets : it shows if selecting or unselecting will or will not concern files that are in the subdirectories of the current directory. The selection screen has three menus too. The "Size" menu allows to change unit ABackup is using to display the size of selected files. You can choose beetween Bytes (the default unit), Kilobytes and Megabytes. Later, we'll describe the "Selection" menu. The "Backup" menu has the following options : Start Allows to start backup. If you selected no file and no subdirectory, an error message will be displayed. The backup progression will be explained below. Options Allows to change the backup options. These options are as follows : Compress Files are compressed in order to bring down the backup size (you can hope for a space-saving from 30% to 50%). Note that backup is seriously slowed down with a "normal" 68000 based Amiga. Note also that ABackup will not try to compress files with a ".lha", ".lzh", ".zoo", ".arc", ".pp" or ".z" file name extension, as well as any file less than 512 bytes long. Verify Reread and compares every track after writing it. Meaningful only for backup to disks. Set archive bit Once backup is over, sets the archive bit (see the AmigaDOS command "Protect") of all files and subdirectories successfully backed up. Backup report Indicates if ABackup has to create a backup report. This one can be printed or written to a file. Backup to Selects an archive. If a given name is of the form "df?:" (e.g. df0:, df1:, etc....), ABackup will use the specified disk unit by writing on disks in a special format. In this case, you need not to format your backup disks. Otherwise, ABackup will create an archive file with the name you specified. Note ABackup has the capability of creating this file on any device that accepts the AmigaDOS "Seek" function. At the bottom of the window, three gadgets allow to validate changes, to validate and save your new options or to clear changes. Options are saved in the "S:ABackup.config" file, that is loaded at every program starting. Estimations Gives an estimation of backup time and of the number of disks needed. The result depends of the size of the selected files, of backup options, and of the processor inside your Amiga. It may not be accurate if other tasks are running during the backup. ABackup always suppose that you backup a hard disk to floppies. About... Displays some informations on this program. To continue, click within the window, over the window close gadget or press any key. Abort Allows to abort whole operation. After it asked to confirm, ABackup returns to the main screen. For starting a backup, you have to select the "Start" item in "Backup" menu. If you asked for backup report to be written to a file, a requester will be brought up so that you can specify a name for this file. If you click over the "Abort" button in this requester, no report will be generated. At this time, a new screen is brought up with different infos on the backup progression. In the bottom area, the file names pass by, followed by an info on the current operation (compression, writing, etc....). If an error occurs (and if this is possible), ABackup will display a message to ask if you want to continue in spite of that. Obviously, ABackup will not make a backup for the file that maked problem. If you asked for a disk backup, you can remove the last disk from your drive as soon as the "Archive closed" message will be displayed. At the top and on the right of this screen there are two gadgets. The "* ABORT *" gadget allows to abort a backup. After it asked to confirm, ABackup returns to the selection screen. The "* PAUSE *" gadget allows to pause a backup for a while. Note that it can happens ABackup doesn't react immediatly when you click over one of these gadgets but, in all cases, your request will be registered before the next write operation in the archive. Once a backup ended (a message will inform you of that), ABackup returns to its main screen. 6. Viewing From the selection screen, you can view any file just by double-clicking on its name. A window appears, with several gadgets. The three upper gadgets show the name of the viewer for each file type: ASCII file, IFF picture, or other file. You can modify these default names. If you change the name of the viewer corresponding to the currently selected file, this new value will be copied in the "Execute" gadget. The "Execute" shows the name of the viewer to use for the selected file. The file type is displayed above (in white). You can, of course, modify the name of the program to use. The three lower gadgets allow you to start viewing ("OK" gadget), to save default names and start viewing ("SAVE" gadget), or to abort operation ("CANCEL" gadget). 7. Restore A menu is brought up allowing to specify the archive that must be used. If you click on the "Abort" gadget, ABackup will return to the main screen. The gadgets corresponding to your drives are automatically enabled or disabled according to your hardware configuration. If you click on one of these enabled gadgets, ABackup will ask you to insert the last disk in the backup set, for loading the catalogue. If you click on the "File" gadget, a requester will be brought up so that you specify your archive file. If you click on the "Abort" gadget, ABackup will return to the main screen. Once you have selected an archive, ABackup will load the catalogue of files backed up in this archive and will display the selection screen. This screen is exactly identical as that one used for backup. Only the "Options" window is different. Options are as follows : At the same level Indicates if selected files will be all restored in the same directory (YES) or if the tree structure will be restored too (NO). Restore date Indicates if ABackup will set the date of restored file to the date they had at backup time. Restoration report Indicates if ABackup has to generate a restoration report. This one can be printed or written to a file. Restore empty dirs Indicates if ABackup has to create empty backed up directories. Replace files Indicates what ABackup has to do if a file it has to restore already exists. Choices are : "No" (file is not replaced), "Yes" (file is replaced), "Ask for" (ABackup will ask to confirm for every existing file), "Older" (ABackup replaces this file only if this one is older than the backed up file). Restore to Usually, files are restored in the directory where they were at the time of the backup, but you can specify another directory by this gadget. For starting a restoration, you have to select the "Start" item in "Restore" menu. If you asked for restoration report to be written to a file, a requester will be brought up so that you can specify a name for this file. If you click over the "Abort" button in this requester, no report will be generated. At this time, a new screen is brought up with different infos on the restore progression. In the bottom area, the names of restored files pass by, followed by an info on the current opération (reading, etc....). If an error occurs (and if this is possible), ABackup will display a message to ask if you want to continue in spite of that. Obviously, ABackup will not restore the file that maked problem. At the top and on the right of this screen there are two gadgets. The "* ABORT *" gadget allows to abort a restoration. After it asked to confirm, ABackup returns to the selection screen. The "* PAUSE *" gadget allows to pause restoration for a while. Note that it can happens ABackup doesn't react immediatly when you click over one of these gadgets but, in all cases, your request will be registered before the next read operation in the archive. Once a restoration ended (a message will inform you of that), ABackup returns to its main screen. 8. The "Selection" menu ABackup has the capability of recording a file selection so that you can recall it later : this can be useful if you use frequently the same selections. These ones are kept as text files containing a set of commands : these files are in the "ABCK:" directory. In order to record a selection, choose the "Record" item in the "Selection" menu; then, do your selection as you do usually. Note that, during this recording, the "Backup" menu disappear (for the time being). Once you have ended, select the item "Save" in the "Selection" menu to save your selection. If you want to abort a recording, choose the item "Abort" in the "Selection" menu. To recall a selection, choose the "Load" item in the "Selection" menu. A file requester will be displayed allowing you to specify the selection file you want use. If you click on the "OK" gadget in this file requester, that file will be loaded and selection it contains will be executed. This is description of the selection language used by ABackup. This allows to create or modify a selection file as you like, by means of your usual text editor. CD : go back to root directory CD / go back to parent directory CD "dir" go down in given directory INVERT reverse selection RECURS {YES|NO} set recursivity flag INCLUDE ALL include all files INCLUDE "name" include given file INCLUDE NAME "name" {==|!=} select by name INCLUDE DATE "date" {<=|>=} select by date INCLUDE BITS "bits" {=0|=1} select by protection bits EXCLUDE ALL exclude all files EXCLUDE "name" exclude given file EXCLUDE NAME "name" {==|!=} exclude by name EXCLUDE DATE "date" {<=|>=} exclude by date EXCLUDE BITS "bits" {=0|=1} exclude by protection bits Here is an exemple of selection file: RECURS YES ; go back to root CD : ; clear any selection EXCLUDE ALL ; include all files with archive bit cleared INCLUDE BITS "a" =0 ; exclude all ".o" files EXCLUDE NAME "#?.o" == Note that empty lines and lines starting by a ";" character are ignored. Also note that ABackup stores automatically the recursivity indicator state at the beginning of your selection record : if you take a look at the created files you'll see they all beging by a "RECURS" command. If you want to be sure to clear a previous selection, it's recommended to start all your selections by clicking on the "ROOT" gadget and then on "EXCLUDE ALL". 9. Program history This program was developped on an Amiga 3000 UNIX-1 (6 Mb RAM, internal HD disk drive, internal hard disk of 100 Mb, external SyQuest drive of 88 Mb, external floppy disk drive, 1960 monitor and Star LC24-10 printer) connected by a null-modem cable to an A500 with 1 Mb RAM. ABackup was written almost in C language, and compiled with SAS/C 5.10b. DPaint IV (from Electronic Arts), SID2 (by Tim Martin), and DME (by Matt Dillon) were very useful too. 12-Mar-92 development beginnning 08-Jun-92 v1.00, 58036 bytes 20-Jun-92 v1.10, 59404 bytes o Handles High Density floppy disks (1.76 Mb). o When run from the Workbench, you can change the size of the read buffer with "BUFSIZE=" in the "TOOL TYPES" field of ABackup icon. o Several changes in backup : - when there is any problem at initialization time, goes back to the selection screen - when an archive file exists, or there is already a disk in drive, asks to confirm before starting writing - tests if files to back up are protected against a read (opening a file works in any case, but under 2.04 system release you will be kicked out at the first read operation) - displays the compression rate for every file (after "OK") o Several changes in the interface : - added the "Size" menu in the selection screen (Bytes/Kb/Mb) - displays backed-up/restored percentage and remaining one - the "monitor" window (in blue) is larger when screen is in PAL mode o Time valuation more accurate (uses the "timer.device"). 28-Jun-92 v1.20, 62616 bytes o Added the "Selection" menu in the selection screen : you can record a selection and recall it later. o Fixed several bugs : - as a result of an error in the computing of remaining place in the last disk, sometimes it wrote a catalogue overlapping two different floppies - when you swapped a disk during a file header writing, it forgot to set up the disk position at 0 (in the catalogue) - during a read, at the end of a disk, it detected one byte earlier it had to ask for the next disk. o For a by date selection, you can give the month name (e.g. "01-Jan-92") o When run from the Workbench, it does not open the small "console" window. 01-Jul-92 v1.30, 67640 bytes o Double-click upon a name starts a "view" operation o Under 2.04 system release, uses "dos.library" pattern matching functions (more powerful than SAS/C ones) o Added "Estimation" option in "Backup" menu o Displays error messages rather than error codes o Bug fixed in "draggin select": didn't displayed directories when scrolling list o Restore screen's title when "Abort" is selected on archive selection menu (Restore) 04-Jul-92 v1.31, 68316 bytes o Added "Restore date" option o Added auditive beep in alert/wait functions o No more need for "arp.library" to make drives "BUSY" under 1.3 system release o Estimations more accurate (don't suppose that last disk is full) Planned improvements : o Access from the CLI and/or AREXX. o Support for non-AmigaDOS partitions (AMAX, etc...) o Function for rebuilding an archive catalogue (even if there are missing disks). o When it will run into a hard error in a disk, it will ask for a replacement disk and will write again all of the files already written on the faulty disk.