User files are the most important to back up; these are both irreplaceable and critical. System files that are customized are also crucial, because your system won't function properly without them. Most system files are located in NeXTSTEP's /private directory; lose them, and you'll spend hours or days reconfiguring your system from scratch. NeXTSTEP's standard system files are the least important to back up, since you can always restore them from the original disk.
Plan for three kinds of backups: a daily personal backup of files connected to current projects; a systemwide backup that copies every file in the file system; and incremental backups in which you copy every file in the file system that has been modified since the last backup.
How often you make backups depends on the nature of your site. If you work alone, you may change only a few files a day. Simply copying these files to a floppy disk at the end of each day may suffice. Once a month, borrow a tape drive and copy your entire hard disk to tape.
Network file servers require more elaborate protocols. One common strategy is to back up the entire disk on the first day of each month. Then, each day, copy to tape only the files that have been modified since the beginning of the month. Since the average tape can be reused a hundred times or so, many sites reuse their incremental tapes every week. But don't pinch pennies with the master backups: Archive them securely as a permanent record of what's been done.
Trust, but verify. When backing up a full system, creating a backup for off-site storage or transporting backup tapes to another site, take the time to verify your tape. Most backup software offers an option to list the contents of a tape or disk. There's a good chance that if the filenames are there, the data will be too.
Backups need to be protected, since they contain copies of every file on your computer. Lock them up! If security is important at your site, don't leave backups running unattended overnight: Somebody could swipe your tape and all of your users' files with it.
Your NeXT system software CD-ROM is your ultimate system backup. There's no need to perform a time-consuming full system backup if you create a script that regularly copies essential configuration files to a folder that is regularly archived. Should your hard drive fail, rebuild it from CD-ROM and restore any configuration files you may have changed.
The trick is identifying system files that never change. You can fool the UNIX dump utility by entering the date you built your file system in the /etc/dumpdates file. The entry will look something like this
("/dev/rsd0a" is the file system name):
/dev/rsd0a 0 Tue Oct 22 12:00:00 1991
Conscientious backing up is pointless if you can't find the right tape when you need to restore files. Get organized with a tape-rotation system. If you back up once a week, keep four tapes, using a different one every Tuesday, for example, and rewriting the tapes once a month. If you back up every weekday, keep five tapes, color-coding each for a different day of the week. Label the tapes clearly with the date each was last used. Remember that tapes wear out; put one of your tapes into permanent storage once a week or month, replacing it with a fresh tape.
Write-protect your backup file after you've created it. Movable tabs on both DAT and 8mm tapes prevent accidental erasure.
If you use the UNIX dump utility, be sure there is no other activity on the system, or your backup can be corrupted. Initiating dump in single-user mode avoids Russian roulette with your data. To get into single-user mode, press both Command keys and the tilde (~) key simultaneously to get to the NMI monitor.
Type monitor to get to the NeXT ROM monitor. Once in the NeXT ROM monitor, type bsd -s to boot into single-user mode, in which you can run UNIX commands such as dump.
Alternatively, create an /etc/crontab entry to call a script that goes off at 4 a.m., disables mail, and does the backup.
You're not planning against disaster if you back up your system and leave your backup tapes sitting next to your computer. Fire, flood, or theft could eliminate your backups along with your system. To play it safe, store some of your backups off-site. For a small organization, that means the system administrator might take a tape home once a week. Larger organizations will ship tapes to secure off-site storage.
Daniel Miles Kehoe and Seth T. Ross are contributing editors for NeXTWORLD.