Classic Computer Magazine Archive START VOL. 5 NO. 6 / FEBRUARY/MARCH 1991


The Programmer's Version-Backup Utility


Pretend you work for Really Big Software developing a Cray emulator for the ST. You made a lot of changes to your SPEEDUP routine so that it was compatible with the new Z0000M code. Today, your supervisor comes in and tells you that the emulator has crashed, and the culprit is SPEEDUP. They've decided to go back to the original code and unless you can find your old SPEEDUP, you'll have to rewrite the whole thing! Luckily you use VerSys and know exactly which backup disk contains SPEEDUP version 8.34, revision G.

VerSys is not just another backup utility. It was designed by a prolific programmer who's aware of the importance of backups and keeping track of all those versions floating around. Some programmers simply copy all their files to backup disks. After several versions, these disks easily get mixed up. Some programmers actually create numbered program names (like SPEED123.C) for each version to help document the backup sequence. This gets difficult when you have a large number of modules, include files and resource files to worry about. Some live dangerously and never or rarely back up.

Both of the first two methods back up all files, not just those that have changed. That makes it an inefficient use of backup time and disk space. The most critical problem, however, is that since all files are copied each time, the programmer does not have an audit trail. Without an audit trail, it is extremely difficult to determine which changes in sour code caused a problem. A typical incremental-file backup program solves the problem of efficiency, but it is not useful for programmers since it copies all files over the previous versions and does not maintain a running archive and audit. Some professional programming groups use commercial version-control and code-documentation systems designed to manage multi-programmer projects. VerSys was designed to provide ST programmers the security of a simple backup system without going to the expense and effort of a full version-control system. VerSys is a must for programmers of any language. Once you start to use it, you will wonder how you ever managed without it.







Backup utility

512K, medium or high rez



Using VerSys
VerSys is on your START disk in the file VERSARC.PRG. It is ARCed, so you need to follow the disk instructions in READ_ME to extract the file VERSYS.PRG.

VerSys is simple to use. It copies files to a new folder which has a name reflecting the time and date of the backup. It allows the programmer to specify the file types requiring backup. If a problem occurs, the programmer can look back to any date and time to see which files had changed or restore a previous version completely. VerSys is useful to anyone who needs to maintain sequential versions of files.

Here's a description of the program's options. The Help key also gives you an explanation.

Paths to backup from: Enter up to nine source paths. Type in the paths or select them by using the Find option. Examples are A:\FUNCTIONS\, C:\C_SOURCE\ and D:\MYPROG\RESOURCE\.

Backup to: Enter the destination path. Type it in or use the Find option. Examples are B:\ and E:\BACKUPS\. After choosing a backup path using the FIND option, the amount of free disk space is displayed.

File types to backup: Enter all the file-extension types you wish to hack up. Examples are C, H, RSC, DEF, BAS, and DOC. The wild-cards ? and * are available. For example, B?S means that BAS files would he backed up, as would files with the extenders of BBS, BCS, BDS, etc. Using * copies all files.

Load Setup: The Load Setup option allows you to load a custom setup. A setup consists of your entries in the previous three options. You may want several setups, such as one for BASIC code and one for C code. You may also have individual setups for different projects. The file VERSYS.SET is the default setup. If this file is in the same folder as VERSYS.PRG, it is automatically loaded when the program starts.

Save Setup: Saves the current setup to a file.

VerSys won't do any good
if it's not used on a
regular basis.

Backup All: This option backs up all files specified in the current setup. It copies the files whether or not they have been changed since the last backup. To tell you that the backup folder contains all files, its name ends with an A.

Backup New: This option copies only those folders that have been changed since the last backup. The folder name ends with a C. VerSys decides if a file has been changed by checking the archive bit of the file. When VerSys backs up a file it sets the archive bit to 1. If the file is changed and then saved, the archive bit is cleared. During a Backup New operation, VerSys copies only those files with a 0 archive bit.

However, TOS 1.4 uses the reverse of this method. It sets the archive bit to 1 to indicate that the file has been changed. VerSys recognizes this difference and backs up correctly regardless of TOS version. But he careful not to mix files from machines having different versions of TOS. If you move your hard drive from a 1.2 machine to a 1.4 machine or vice versa, do a full backup to make sure that the archive-bit logic is correct.

Suppress Copy: Click on this box to suppress copying. Use this to preview the planned backup. The program will proceed exactly as if an actual backup is taking place, except no files are actually copied or archive bits modified. Suppression is used to see exactly which files will he backed up and to find out how much disk space you need VerSys will report the amount. This is especially important for floppy-drive users.

Set Clock: Backups are stored in a folder named with a time and date code, YY indicates the year, such as 89. MM indicates the month, 01-12. DD indicates the day from 1-31. HH represents the hour, 01-24. mm represents the minutes, 00-59. The last character, ?, is replaced with A if all files have been copied or C if only changed files are in the folder. Obviously, the date and time on your ST clock must be accurate in order to name the backup folders correctly. The Set Clock option allows the clock to he checked and set. For example, say that it is June 17, 1991 at 10:20 and you wish to hack up all programs from the folders D:\PROJECT1\ and D:\BOB\WHITE\ to E:\. VerSys would copy all files of the specified types to the new folders E:\9106710.20A\PROJECT1\ and E:\91061710.20A\BOB\WHITE\.

Quit: Returns to Desktop.

Program Specifications
VerSys is less than 10K and can be installed as a tool under the Megamax Laser C Shell. It can copy files up to 300K long and can back up 400 files in one operation. VerSys does not require any support files.

Use It!
Of course, VerSys won't do any good if it's not used on a regular basis. Back up your code after each programming session. If yon have very long sessions (which is not uncommon!) you should do a backup every couple of hours, or when you make a significant change to the code. If you use it, VerSys will save you from those programmer's tension headaches!

Tyson Gill owns and operates GT Software. Over the past five years he has developed over a dozen Atari ST-based applications.