Previous Chapter : Next Chapter : Top
This chapter introduces you to some basic concepts about backing up data and discusses common backup strategies.
One of the most serious considerations facing any computer system administrator is that of secure backups. The risk of losing data through machine failure, carelessness, or willful destruction must be minimized.
As a computer installation grows in size or scope, running backups and providing restore services becomes expensive in terms of time and resources, unless this operation can be automated. In a networked environment, these concerns become even more critical.
Backups help prevent the loss of data caused by equipment failure as well as accidental deletions. Creating a backup is simply making a copy of the information in your computer system. A backup allows you to easily restore this information on an as needed basis.
Backups also allow you to access previous versions of a file. For example, you may be working on the fifth version of a document and find that you need to return to an earlier version. As long as backups are performed on a regular basis, previous versions of files can be easily restored.
Another use for backups is to free up disk space by archiving outdated or rarely used files. (In BACKUP.UNET, this is referred to as a named backup.) After you have backed up these files, you can delete them from the disk, thus providing more space.
How often you run backups depends on how often the data changes, how important the data is, and what is the oldest version of the data that you may need.
A common backup schedule is to run a full backup once a week and once a month, and run incremental backups on a daily basis. With this backup schedule, you would lose only one day's work. If you cannot afford to lose that much data, you may want to consider backing up more frequently, for example running incremental backups twice a day.
Regardless of how often you decide to run your backups, be sure to backup data that you cannot afford to lose.
The BACKUP.UNET Backup Scheduler allows you to set up a schedule to automatically run backups at the same time each day, week, or any other time. The backup scheduler is available only from the command line interface and the Motif GUI. For detailed information about the backup scheduler, see page 4 12, Scheduling Automatic Backups.
Before you can run your first backup, you need to determine which files and file systems are to be included in each full and incremental backup. You specify just those sections of the file system you wish to back up by including them in a worklist.
A worklist is a text file that is easy to specify in a series of English like statements made up of keywords and filelists. These statements let you quickly and easily name files and directories in the file system that will and will not be backed up. The worklist is also used to specify the points at which your data will be split into streams to allow parallel backups.
When you start a backup, either full or incremental, BACKUP.UNET uses the worklist on the local host to determine the files to be backed up.
For more information about worklists, see Chapter 5, Using a Worklist.
A backup is a single backup operation. It may extend over several backup volumes, and is either a full or an incremental backup. Through BACKUP.UNET, you can perform full, incremental, and special incremental backups over the network. Backups are generally run in a cycle. A backup cycle consists of one full backup and all its subsequent incremental backups. For each backup you can specify:
A full backup is performed when all the files specified in a worklist are to be written to the backup volumes.
An incremental backup is performed when only the files that have been added or modified since the last backup are to be written to the backup volume(s).
A special incremental is the same as an incremental backup except that it does not access the tables to verify whether files have been deleted.
This backup method allows backups to run faster; however, it affects the restore process. For example, you create a file named file1. During the full backup it is backed up. The next day you rename file1 to file2. If you run a special incremental backup, file2 is backed up but there is no notation that file1 no longer exists. If you restore the directory containing file2, you will get both copies of the file: file1 and file2.
Backup format refers to the physical layout of data on a backup media volume. In a multiple machine environment, the choice of formats provided by BACKUP.UNET lets you pick the appropriate one for each host, and allows you to move data among machines. You can also read a BACKUP.UNET volume with your own programs and utilities, with no formatting incompatibilities. BACKUP.UNET supports the following backup formats:
The total path length of file names that can be processed by BACKUP.UNET is variable. Each backup format has its own name size limits:
BACKUP.UNET does not follow symbolic links because the information potentially could be backed up twice once from the symbolic link and once from the true link.
A raw partition is a section of the disk not managed by the operating system. The only way you can access the raw partition is through an application, typically a database application.
A special device file is usually located in the /dev directory but they may exist anywhere.
To back up raw partitions and special device files, specify the file names in the worklist and in the 'nbkPARTITIONS' file. You must use cpio or cpio -c format to backup raw partitions and special device files.
See page 15-15 for detailed information about the 'nbkPARTITIONS' file.
Backup streams allow you to backup a single host to multiple tape drives simultaneously. Multiple backup streams may also be referred to as parallel backups.
To set up backup streams, you must edit your worklist to specify the points at which your data will be split into streams. For instructions on using the STREAM keyword to specify streams in your worklist, see Chapter 5, Using a Worklist.
After you have set up your worklist to use multiple streams, you can specify they be used from all interfaces. To use multiple streams during a full backup:
Refer to the corresponding user's guide for complete instructions on specifying multiple backup streams.
The device reselection feature allows you to run unattended backups that require multiple volumes using multiple devices. BACKUP.UNET uses device reselection by default. With device reselection, BACKUP.UNET considers all of the available devices defined for the specified pool. This feature is useful if you know that a backup job uses more than one volume. You can load free volumes in several devices servicing the same pool, and allow the backup to run unattended at night.
With device reselection, BACKUP.UNET broadcasts a device request to the providers of the pool and selects the first available device. After the first volume has been written, another request is broadcast and the next available device in the pool is used. This device selection continues until the backup job is complete.
For device reselection, you can optionally select a provider and BACKUP.UNET uses all of the devices associated with it. If you do not select a provider, BACKUP.UNET automatically selects a provider for you.
If you do not use device reselection, you can explicitly specify a provider and device on which to run the backup, or you can let BACKUP.UNET automatically select a provider and device to use. But in either case, BACKUP.UNET uses only a single device for the entire backup.
Device reselection is a default backup option and is available in all user interfaces. However, you may want to specify a provider from which to select backup devices. If you do not specify a provider, one is chosen automatically.
If you do not want to use device reselection, this feature may be disabled. BACKUP.UNET broadcasts a device request to all providers of the pool and selects the first available device. This single device is then used for the entire backup. If the backup requires multiple volumes, an operator must be present to mount each volume on the device as required.
BACKUP.UNET also allows you to specify a provider and device to be used for the duration of the backup. If you specify only the provider, BACKUP.UNET broadcasts a request to the provider and selects the first device that responds to the device request. This device will be used for the entire backup job.
You can also specify a device associated with the selected provider. If you do not select a device, BACKUP.UNET automatically selects a device for you.
You can optionally specify a provider from which to select backup devices. If you do not specify a provider, one is chosen automatically.
You can optionally specify a device on which to run the entire backup. If you do not specify a device, one is chosen automatically.
Refer to the corresponding user's guide for complete instructions on specifying a provider and device.
Running backups automatically using BACKUP.UNET can be accomplished by setting up a schedule using the Backup Scheduler. The scheduler is available only from the command line interface and the Motif GUI. The scheduler enables you to specify a schedule of backups that are invoked automatically.
The backup scheduler allows you to specify days and times to perform full or incremental backups, either by specifying dates, or by specifying predefined or user defined backup cycles (for example, weekly, bi weekly, monthly, or daily).
BACKUP.UNET's design allows you to run backups as frequently as needed, and to intersperse any number of incremental backups (or no incremental backups) between each full backup. For example, if backups are run once each day, a user who inadvertently deletes a file at the end of the day may be only able to restore yesterday's version of the file. However, if several incremental backups are run during the day, the user will be able to restore a much more recent version of the deleted file. Most sites choose to run a new full backup at regular intervals (for example, once a week per host system).
To set up a schedule for your backups, first set up your worklist, then create backup configurations using either the menu system or the GUI, for example one for fulls and one for incrementals. Then to set up a backup schedule:
Refer to the corresponding user's guide for complete instructions on using the backup scheduler.
The Append feature allows several host systems to be backed up to a single tape volume. It also allows a host to put a series of backups (for example, a single full backup and subsequent incremental backups) on one tape volume.
Note: The tape drive used for appends must be capable of writing tape marks. 9 track, 8mm, 4mm (DAT), and some TK50 devices support the append feature.
Caution: If you attempt to append to a device that does not support this option (for example, a cartridge tape drive), the data on the tape may be corrupted.
During the first backup, the backup data is written to a BACKUP.UNET labeled tape (that does not contain any backup data) followed by three tape marks (end of file or EOF marks). When the backup is complete, the tape contains a backup segment (the backed up data) and three tape marks.
When the second backup is started, BACKUP.UNET skips forward one segment, skips one tape mark, writes a tape mark, writes the second segment (the second backup's data), and writes three tape marks. The tape now contains the first segment, two tape marks, the second segment, and three tape marks. The process continues for each subsequent appended backup.
Figure 4 1 shows the format of a BACKUP.UNET tape.
Graphic: Figure 4-1. BACKUP.UNET Tape Format
The append feature is available in all interfaces. To use the append feature:
Refer to the corresponding user's guide for complete instructions on using the append feature.
BACKUP.UNET can back up and restore files in ANSI data format. The ANSI backup format is helpful when backed up files need to be retrieved on another system that is fully ANSI X3.27 (level 4) compatible.
The ANSI backup format is available in all interfaces. To use the ANSI backup format:
Note: If backed up files must be fully ANSI X3.27 (level 4) compatible, you must specify the magtape control option (-magtape) in addition to the -ansi argument with the nbkup command. The -magtape argument is used only for backup operations and cannot be used anywhere else. The -magtape argument tells nbkup that the device is a 9 track tape drive and that tape marks (EOF markers) must be written before and after each file's data.
Compression reduces the size, and therefore the storage requirements, of a data file, by applying an algorithm to remove redundancy in the data. The default option is no compression.
Data are compressed before they are transmitted over the network, and then are written to the backup volume in compressed form. This reduces the load placed on the network by BACKUP.UNET. Depending on the speed of the network, performance of backup and restore operations may be improved as a result of transmitting the data in compressed form.
Note: Any compressed files written on a backup volume with a release of BACKUP.UNET prior to 3.0, must be restored with the -compress option of the nrest command. In release 3.0 and all future releases of BACKUP.UNET, compressed files are recognized during the restore procedure and are automatically uncompressed without specifying the -compress option.
Compression is available in all interfaces. To use the compression feature:
Refer to the corresponding user's guide for complete instructions on using compression.
BACKUP.UNET supports data encryption and decryption for backups and restores using a customer supplied encryption filter (program). BACKUP.UNET does not supply any encryption algorithms.
Your encryption/decryption filter should be able to read standard input and write standard output. This program is called once for each file to be encrypted or decrypted.
Note: Any encrypted files written on a backup volume with a release of BACKUP.UNET prior to 3.0, must be restored with the -crypt option of the nrest command. In release 3.0 and all future releases of BACKUP.UNET, encrypted files are recognized during the restore procedure and are automatically decrypted without specifying the -crypt option.
Before running a backup with encryption, you need to modify two messages in '$NBK/nbkMSGS' and include your site specific encryption/decryption information. Message 503 identifies the filter and any arguments needed to encrypt files before they are backed up. Message 504 supplies the same information for decryption which occurs any time encypted files are restored. The required syntax of these messages is described below. 'nbkMSGS' is an ASCII file that can be modified with any standard UNIX editor.
Note: The variable arguments must be used in order, as above. If only one is used, it must be %s; if two are used, they are %s%d; if all three are used, they are%s%d%d respectively.
Encryption is available in all interfaces. To use the encryption feature:
Refer to the corresponding user's guide for complete instructions on using encryption.
Examples of encryption/decryption specifications (using sample messages 503 and 504) are shown below.
503 trot13 -key example -salt %s%d 504 trot13 -key example -salt %s%d
In these examples, trot13 represents the name of the program that is the encryption/decryption filter, and -key example and -salt represent arguments that affect the algorithm used for the encryption/decryption.
BACKUP.UNET has the capability to split a single file between two volumes during the backup process. This has two major advantages:
A file split between two volumes is restored automatically by BACKUP.UNET to its original condition. No special options need to be invoked during the restore process.
A single file cannot be split among more than two volumes. If you are trying to back up a file that will not fit on two volumes, consider changing your media type to one with a higher capacity. A second option is to invoke the BACKUP.UNET compress feature to reduce the size of the file before backing it up.
Splitting files between volumes is available in all interfaces. To use the split feature:
Refer to the corresponding user's guide for complete instructions on splitting files.
In the event of a major system failure, e.g., a corrupted hard disk which must be reformatted, BACKUP.UNET becomes the critical tool for restoring your system to its original state. Of course, BACKUP.UNET can only restore files that have been backed up. Therefore, it is essential that during installation and configuration of BACKUP.UNET you take the time to thoroughly investigate your system and determine what files are of importance to its operation.
Refer to Chapter 16, System Recovery, for instructions on performing a full system recovery from your backup volumes.
The default worklist, 'nbkWORKLIST' (in the home directory), includes all the major parts of a UNIX system. As a generic worklist, it can be used on any UNIX platform. Because it is a generic worklist it may miss critical portions of your system. For example, '/etc' is excluded except for certain key files. Review this list to determine if there are any other files critical to your systems operation that are missing. Refer to Chapter 5, Using a Worklist, for detailed information about modifying your worklist.
In a multi volume backup, the Backup Control Volume (BCV) is the last volume. (If the backup only occupied one volume, then that volume is the BCV.) In addition to the files you have saved, the BCV contains information about the backup cycle as a whole. After each successful backup operation the name of the BCV is recorded in the 'nbkLOG' file. The 'nbkLOG' file holds a journal of selected BACKUP.UNET events and errors that serve as an audit trail.
Normally this information is not required; however, in the event you need to restore your entire system, you will need the BCV to perform a full system recovery. Each time you run a backup, put the new BCV in a special location and place the previous BCV with the rest of the backup volumes.
The BCV is crucial in performing a full system restore. Always make sure you know the physical location of the BCV in case you need to refer to its contents.