ABackup - User's Manual 1. Foreword This manual describes release 1.31 of the backup utility ABackup. This program is freeware, and permission is granted to freely copy and distribute it by all mediums, provided no charge or fee is ask 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 written authorization, is ABSOLUTLY FORBIDDEN. In spite of several tests, no warranty is made that there's no errors 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 utility written for the Amiga. It works under 1.3 and 2.0 system releases, may be used both for hard disk backup and for file archiving, and has a full Intuition interface. ABackup can also handle HD disks (some A3000 have a high density internal disk drive which stores 1.76 Mb on HD disks). This program is SHAREWARE. If you find it useful, please send $10 (cash or check in French Francs from an european bank only) at the address below, to become a registered user. In return, you will receive the next version of ABackup, as soon as it will be available (along with a better translated doc I hope !). Critics and suggestions will always be welcomed. Write 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 for constant support, and to Michel SCHINZ (without him this program would still be a project !) 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 from CLI and from Workbench. From CLI, the command line syntax is: ABackup [-wbuf] [directory] The -w option can be used to increase buffer size, e.g. -w64 asks for a 64 Kb buffer. Default buffer size is 4 Kb. The optional directory name is the name of the directory to backup (default is current directory). From Workbench, you can modify buffer size by adding a ligne "BUFSIZE=" in the "TOOL TYPES" field of ABackup's icon. When program start, it opens a screen with three gadgets: "Backup", "Restore", and "Quit". Select the desired operation. 4. The requesters. When using ABackup, you will often have to answer to requesters. These requesters will have one or two gadgets ("Ok", "Continue/Abort", "Yes/No"). Of course, you can answer by selecting a gadget, but you can also press the letter corresponding to the gadget (e.g.: "c" or "C" for "Continue"). Another possibility is to press for the "positive" choice ("Ok", "Continue", "Yes") and for the "negative" choice ("Abort", "No"). When the requester asks you for a disk the program will also test if you insert a disk in the good disk drive and, if so, will assume you have answer "Continue". 5. Backup. A directory requester appears, so you can select the volume or directory to backup. If you click on "Abort", you will go back to main menu. If you click on "Ok", ABackup will start to load directory contents. To abort directory loading, click on the "Abort" gadget or press one of the following keys : "a", "A", . Once loading is complete, the selection screen appears: it has a set of gadgets and a lower window in which the files and sub-directories of the current directory are displayed. By default, no file or sub-directory is selected for backup. Files are displayed in black over a grey background, and sub-directories in white over a grey background. You can scroll the display with the knob at the right of the screen. The name of the current directory is displayed in the "Directory" field. The number and the size of selected files are displayed in the "Selection" field. To select a file, just press left mouse button when the mouse pointer is over the file's name: the name is now displayed over a blue background, and the "Selection" field is updated. If you click on a file which is allready selected, it will be unselected. To select or unselect several files, just move the mouse pointer while holding the left button down. Last, to view a file, just double-click on its name (see below for details). When you select a directory, this directory will either be selected (just like a file) if it's empty, or you will go down in this directory: the files list and the "Directory" field will be updated. To go back to the previous directory, select the "Parent" gadget (above the knob) or click on the invisible gadget between the screen's left border and the files list. To go back to the initial directory, use the "Root" gadget (above the knob). On the selection screen, you will also find two identical rows of gadgets. This gadgets can be used to make a global selection (upper row) or unselection (lower row) of files: All Selects or unselects all files and sub-directories of current directory. By name Selects or unselects files and sub-directories by name or pattern. A pattern is a string which contains one of the AmigaDOS wildcards : '#' or '?' under 1.3 system release, '#', '?', '|', '~', '%', parentheses or brackets under 2.04 system release (refer to your AmigaDOS User's manual). A requester appears so you can enter the name or the pattern to match. Click on the "==" gadget to select/unselect files that match this name, or on the "!=" gadget to select/unselect files that don't match it. To abort, just close the window. By date Selects or unselects files and sub-directory by date of last modification. A requester appears so you can enter date and/or time. The syntax for the date is DD-MM-YY or DD-MMM-YY (e.g.: "01-03-92" or "01-Mar-92"). The syntax for the time is HH:MM:SS. Click on the "<=" gadget to select/unselect files older than this date, or on the ">=" gadget to select/unselect files newer than this date. If you enter only time, the date will be the current date. If you enter only date date, time will be set to "23:59:59" if you click on "<=" or to "00:00:00" if you click on ">=". To abort, just close the window. By bits Selects or unselects files and sub-directory by protection bits. A requester appears so you can enter the bits to test (see AmigaDOS command "protect"). Click on the "= 1" gadget to select/unselect files with these bits set, or on the "= 0" gadget to select/unselect files with these bits cleared. To abort, just close the window. At the right of the screen you'll see two other gadgets. The "Reverse" gadget reverse the selection: all selected files become unselected, and all unselected files become selected. The "Recursive" gadget controls the action of "Reverse", "All", "By name", "By date", and "By bits" gadgets : it tells if selection or unselection will affect files in the sub-directories of the current directory. The selection screen also has three menus. The "Selection" menu will be described later. The "Size" menu allows you to select the unit for displaying the size of the selected files: you can choose between bytes (default), Kbytes, and Mbytes. The "Project" menu has the following items: Start Starts the backup. If no file is selected, an error message will appear. The backup processing will be described later. Options Allows you to view/modify backup options: Compress Files are compressed in order to reduce backup size (a gain between 30% to 50% can be expected). Please note that this increase seriously backup time if your Amiga only has a 68000. Also note that ABackup won't try to compress file with ".lha", ".lzh", ".zoo", ".arc", ".pp", or ".z" extensions, or with size lower than 512 bytes. Verify Read and compare each track after writing. Usefull only when backing up to floppies. Set archive bit Once the backup operation is finish, set archive bit on all files and directories successfully backed up. Backup report Asks for a backup report, either printed or written to a file. Backup to Select archive to use. If the name is "df0:", "df1:", ... ABackup will use the corresponding floppy drive, writing to disks with it's own format (disks don't have to be allready formated). Else, an archive file will be created. Please note that ABackup is able to use any device that supports AmigaDOS Seek() function. At the bottom of the window, three gadgets allow you to validate the changes, to validate and save the new options, or to cancel the changes. The options are saved in the "S:ABackup.Config" file, and loaded each time the program start. 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 about ABackup. Click inside the window, close it, or press any key to continue. Abort Allows you to cancel the backup. After confirmation, ABackup will return to main menu. To start backup, you must select the "Start" item of the "Project" menu. If you asked for backup report to be written to a file, a requester will appear so you can select the report file. If you click on the "Abort" gadget, no report will be produced. A new screen appears, with several informations about the backup processing. In the lower part of the screen is displayed the name of the file currently processed. If an error occurs (and if possible), ABackup will display a requester asking you if you want to continue. If you asked for a backup to floppies, you can remove the last disk as soon as the message "Archive closed" will appear. The "* STOP *" gadget allows you to stop the backup. After confirmation, ABackup will go back to the selection screen. The "* PAUSE *" gadget allows you to stop the backup for a while. Please note that ABackup may sometimes not be able to answer immediatly, but will always check these gadgets before the next write operation. Once the backup finished, ABackup will return to the main menu. 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 appears, so you can select the archive to restore from. Click on the "Abort" gadget to return to main menu. Gadgets associated with disk drives are automatically enabled or disabled depending of your material configuration. If you select one of those gadgets, ABackup will ask you to insert the last disk of the backup disks in the corresponding disk drive. If you click on the "From file" gadget, a file requester will appear so you can select the archive file. Once the archive catalog loaded, the selection screen will appear. Please refer to the previous section for a description of this screen. The only differences are in the option window : At the same level If set to "YES", all files will be restored in the same directory. If set to "NO", directory tree will be restored too. Restore date Tells if ABackup will set the date of restored file to the date they had at backup time. Restore report Asks for a restore report, either printed or written to a file. Restore empty dirs Tells if ABackup will restore empty directory. Replace files Controls ABackup behaviour when a file to restore allready exists. Values are "Newer" (file not restored), "Yes" (file replaced), "Ask" (ABackup will ask for confirmation for each file), "Older" (replace file only if older than the one in archive). Restore to Directory to restore files. If no value is given, files will be restored in the directory they where. To start restore, you must select the "Start" item of the "Project" menu. If you asked for restore report to be written to a file, a requester will appear so you can select the report file. If you click on the "Abort" gadget, no report will be produced. A new screen appears, with several informations about the restore processing. In the lower part of the screen is displayed the name of the file currently processed. If an error occurs (and if possible), ABackup will display a requester asking you if you want to continue. The "* STOP *" gadget allows you to stop the restore. After confirmation, ABackup will go back to the selection screen. The "* PAUSE *" gadget allows you to stop the restore for a while. Please note that ABackup may sometimes not be able to answer immediatly, but will always check these gadgets before the next read operation. Once the restore finished, ABackup will return to the main menu. 8. The "Selection" menu ABackup can record a selection of file to backup/restore, and load it later. These selections are stored in text files, as a set of commands. Default directory for these files is "ABCK:" (should be assigned to "S:ABackup" directory). To record a selection, select the "Record" item of the "Selection" menu and select files as usual. Please note that the "Project" menu disappears while you make your selection. When you have finished, select the "Save" item of the "Selection" menu to save this selection. If you want to cancel the recording, select the "Abort" item of the "Selection" menu. To load a selection, select the "Load" item of the "Selection" menu. A file requester appears so you can choose the selection to load. If you click on the "Ok" gadget, this file is loaded and the selection processed. Here is the description of the selection language used by ABackup, so you will be able to create or modify a selection file by yourself. CD : go back to root directory CD / go back to parent directory CD "dir" go down in given directory INVERT reverse selection RESURS {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" == Empty lines and lines beginning with a semi-colon are ignored. When you start to record a selection, ABackup always store the state of the recursivity flag: if you look at the selection files you'll find that they all begin with a "RECURS" command. If you want to be sure to clear any selection, be sure to start your selection by going back to root directory and excluding all files. 9. A quick history This program has been created on an A3000 UNIX-1 station (6 Mb RAM, 100 Mb internal hard disk, 84 Mb external SyQuest cartridge drive, HD internal disk drive, 880 Kb external disk drive, 1960 multiscan monitor and Star LC24-10 printer) connected with a null-modem cable to my old A500. ABackup is almost fully written in C language, and compiled with SAS/C 5.10b compiler. DPaint IV (Electronic Arts), SID2 (Timm Martin) and DME (Matt Dillon) have also been used. 12-Mar-92 Project beginning. 08-Jun-92 v1.00 20-Jun-92 v1.10 Handles HD disks, a few "esthetic" changes 28-Jun-92 v1.20 Saves/loads selection files. 01-Jul-92 v1.30 Double-click on a file starts a viewer, added "Estimations" menu item. 04-Jul-92 v1.31 Added "Restore date" option, auditive beep. To do: o access from CLI and/or AREXX o backup of non-AmigaDOS partitions (AMAX, ...) o function to retrieve archive catalog (even if disks are missing)