ERROR RECOVERY & BACKUP





People make errors, computers are subject to malfunction, and diskettes can be damaged by physical abuse or their information lost due to magnetic fields or large temperature changes. Hard disks are susceptible to power surges and electronic malfunctions, too. Your data is extremely important, since the loss of an entire diskette's information would result in hours to days of work to duplicate if the original source data was still available!

The information on a diskette is so densely packed that it requires a very high quality recording surface that must be maintained at all times. You can lessen the likelihood of an eventual disk error by buying high quality media and always treating the diskette with great care. Always keep diskettes in their protective jackets and away from potential damage from spilled drinks, cigarette ashes, etc. Never leave a diskette in a hot, closed car, even for a few minutes, and keep them away from telephones (the magnetic field produced by the bell ringing can destroy data).

Regardless of the type or quality of equipment you are using, it is only a matter of time until you will have to recover from some sort of error. Therefore, it is absolutely necessary to devise a comprehensive procedure for backup, and use it regularly. A sound backup procedure will include making copies of all your payroll data files and keeping them in a safe (but accessible) place in case they are needed. You should also print paper copies of the payroll report each period and the employee master list every time it is changed for a "last resort" backup in case all else fails. It is particularly important to retain copies of all data files created by the system for the current year, since they will be needed to make comparative reports (including your Quarterly reports).

To aid you in keeping backup copies of your files, the system automatically makes a copy of the current employee master file every time payroll is calculated. However, since this copy is on the same disk drive as your other payroll data, any event that renders the entire disk drive useless will make these backup files useless also. Therefore, it is recommended that you keep a backup copy of any new data files on removable media (diskette or tape) by making a copy every time payroll is calculated.

Recovering from errors requires that you understand how the payroll system uses disk files and how the files are named. All payroll data files have names of the form "*.PAY". The main file used by the system is MASTER.PAY, which contains everything the computer knows about your company and employees for the current payroll period. The key file, KEYFILE.PAY, and the master file are the only files that are changed as a result of maintaining company data, employee data, or calculating payroll. The key file can be regenerated from the master, so all error recovery is aimed at getting MASTER.PAY to be correct as of a certain date and proceeding from that point.

A third file used by the system is TAXTBL.PAY. It contains the tax tables and is only changed when it is necessary to alter the tax tables. It must be on the data disk (or hard disk data directory). If it should become unreadable, it may be recovered by copying it from a backup disk (you did make a backup, right?). But if all else fails, you can always re-enter it again by hand from the information published in Federal Circular E and similar publications from your state and local taxing authorities.

Other files are made every time the master file is initialized for a new pay period. The program that does the initialization does not actually change the information in the master file you used to print checks, it only renames your current master, while creating a new master file for the next period. Thus, the files named PRmmddyy.PAY files contain all of the current data for the indicated pay period, and Year-to-date totals which include all periods up to, but not including, the indicated pay period.



Note that Custom Payroll's Current Report gives you the illusion that the current data has already been included in the Year-to-date totals so that you can see exactly what the consequences are of accepting the current payroll data as correct.



Suppose the directory of your data disk looks like this after you finish processing your payroll for the pay period ending June 12, 1995:

TAXTBL.PAY KEYFILE.PAY MASTER.PAY

The MASTER.PAY file contains complete Company and Employee information for your payroll, and has been used to produce all reports and print checks. Now you run the Initialization utility for a new period for a new period. If you were to interrupt this program while it is working, the directory would look like this:

TAXTBL.PAY KEYFILE.PAY MASTER.PAY

$$$.PAY

The new file, $$$.PAY, is a temporary name for what will become your new master file. The program uses this temporary name only while the file is being built to let you know that it is incomplete. When the initialization is complete, your directory will look like this:

TAXTBL.PAY KEYFILE.PAY PR61295.PAY

MASTER.PAY

Your old file has been renamed to PR61295.PAY, but is otherwise unchanged. The payroll system can use this file as a source of data for a comparative report, or you can make a copy of it any time you need the master file for 6-12-95.



Illustrative Example:



After a job well done, you get up from the computer to get a cup of coffee and accidentally knock the diskette on the floor. When you return, you don't notice it under your chair. Ten minutes later you find it, but the plastic has a nasty looking dent where your chair wheel ran over it. Naturally, you haven't had time to back it up yet, so you immediately give it a try. Sorry, "disk media error on source drive" is reported by the DISKCOPY program. This means that the program has detected unreliable data and is refusing to make a copy. What do you do?

See if you can display a directory of the disk. If you can't, the diskette is useless and you must go to your most recent backup disk and do the job over. However, if the directory can be displayed, part of the disk may be usable. Try to copy the files from the bad disk to the new one individually. For illustration, suppose that all files except MASTER.PAY can be copied to the new disk so that its directory looks like this:

TAXTBL.PAY KEYFILE.PAY PR61295.PAY

Since you were able to copy PR61295.PAY, you can make it your master file by renaming it as MASTER.PAY. This puts you back where you were before you initialized the master file after completing the June 12, 1995 payroll. You can run the Initialization program over and complete the job.

Other types of error recovery similarly involve the copying and renaming of relevant payroll data files.



Note that if you only have a single copy of any file, it is better to COPY it into a file of another name than to simply rename it: copying always leaves you with another chance to recover!



After Recovery...



It is always good practice to rebuild the Master Keyfile (from Main Menu: IN, then KF, then MK) immediately after restoring an old payroll, before using any other payroll selection. This assures that KEYFILE.PAY file you are using matches the employee data in the restored data file.



About Backup Programs:



A good backup program should work on any PC system configuration, and should be able to read data back even if the operating system used to save the data is different from the one used to restore the data. You should be able to backup files under DOS and restore them under Windows and vice-versa. Data compression is a useful feature of many modern backup programs, and is highly effective with payroll data files: you will typically get data compressions of 7:1 to 10:1 for these files (MASTER.PAY and PR*.PAY).



Many of the utilities named "BACKUP" which are preloaded on new systems or which come with DOS are NOT capable of reading data saved from a different machine... or even the same machine using a different version of DOS. Using these can lead to massive loss of data the first time you upgrade your operating system or replace a hard drive or system board.



Regardless of the method you choose, you should always TEST your backup procedure by doing a trial Backup-and-Restore "fire drill" before entrusting your data to any backup facility. Do not assume that it will work because it is new, or because you have seen the system work on a different machine or at another site! Some system boards will not work with any tape backup system, and you will not discover this until you actually try to restore data: the backup process usually appears to work flawlessly on such systems.



Third-party utilities which can be used successfully on many different hardware configurations and many operating systems are available from Central Point, Norton (Symantec), 5th Generation Systems (FASTBACK), Colorado Memory, and others.



Finally, always put the procedure you will use for backup and restoring data in writing. When the procedure is needed, you may not be the operator. Also, the operator will be under considerable stress whenever a "restore" is needed.



Restoring Payroll from a backup copy



When restoring Payroll data from a tape or disk backup copy, consider carefully whether you want to restore the file MASTER.PAY (the current-period data) from the backup, or keep the one you have. Restoring an old MASTER.PAY will have the effect of "turning back the clock" to the time the backup was performed, and will destroy any current-period data which may have been entered but not yet Initialized. For this reason, we recommend:



1. If possible, Initialize the current period before restoring from a tape or disk backup. This will keep you from 'losing' the current period data.

2. Immediately after restoring from a backup, print a Current Report (BOTH zero and nonzero current pay, BOTH active and inactive employees) to verify that the MASTER.PAY file represents the most recent pay period. Any time you ar in doubt about the contents of MASTER.PAY, you can use UNINITIALIZE (from Main Menu: IN - AU - UI) to restore the most recent Initialized pay period.



Payroll history files (PR*.PAY), should never change once they are created, unless you re-run old periods. If you have re-run an old period, be aware that restoring a backup made before your re-run may have the effect of reversing any changes you have made.