This section describes how to set up the scheduled backup features of Backup, including automated group backups and customizable backup schedules.
Use Backup groups to designate what time a client's scheduled backup starts. You can assign client save sets to Backup groups to control which client's save sets back up at which times. You can also assign a client's save sets to more than one group.
If you have an especially large number of client machines, consider creating several groups with different start times to help reduce network traffic. For example, you could start the backup time of the group that includes the engineering department's machines at four o'clock in the morning, and the group with all other clients on the network at midnight.
If you create different groups, be sure to stagger their start times to avoid overloading the server. Schedule them far enough apart so that one group has completed its backup before the next group starts. Backup does not start a new group's backup until all the groups with earlier start times are finished. See "Example: Scheduling Large Client Filesystems".
Backup provides several preconfigured groups for you to use. If you need a different group configuration, you can create new groups to fit your situation. To create and use a customized group, follow these steps:
Create the group in the Groups resource.
Edit an existing pool or create a new pool in the Pools resource. Select the new group in the Groups attribute.
In the Clients resource, edit or create the client resources for the client machines that contain the save sets you want to include in the group. Select the new group in the Groups attribute.
Do not include spaces in a group name.
The client save sets in each Backup group begin their automatic scheduled backups according to the start time of the group. You can balance the backup loads by taking the client's backup schedule into account when you decide which clients to include in a specific group. (Refer to "Schedule Configuration " for more information about creating schedules that vary the days that different clients perform full backups.)
Figure 3-1 illustrates how Backup uses backup groups to back up multiple client save sets.
In this example, three client machines, Oak, Elm, and Fir, are part of the group named Weekly Full, which starts its automatic scheduled backup at midnight. Client Oak runs a full backup of all its save sets every Monday and incremental backups of its save sets on the other days; client Elm runs a full backup of all its save sets on Tuesday and incremental backups on the other days; and client Fir runs a full backup of all its save sets on Wednesday and incremental backups on the other days of the week. Because each client runs its full backup on a different day of the week, the server is not overloaded.
The second group, "Accounting," illustrates how you can group clients by department. Group Accounting contains client machines Birch and Pine and starts its backups at 7:00 p.m., when the machines in the Accounting Department are available for backup. Although the two client machines run full backups on the same day, machine Pine is scheduled to back up only the /usr/home save set; all the save sets on machine Birch are backed up. By estimating how long a backup takes, you can determine what start time to set for the next group.
The save sets from each group are written to appropriate volumes mounted on storage devices. Backup uses pools of volumes to organize, track, and store save sets; it uses groups to determine what time clients start their scheduled backups.
Backup ships with a preconfigured group named "Default." To ensure that all data is backed up, Backup automatically adds all clients to the Default group. However, you must enable the default group for Backup to back it up. Depending on your needs, you can keep a client in the Default group, or you can put the client in one or more customized groups.
The two critical attributes in any group are the Start Time attribute and the Autostart attribute. The Start Time attribute for the Default group is set to start its daily backup at 3:33 a.m. You can change the Start Time attribute. You must enable the Autostart attribute for the Default group, and any other group you create, before Backup can run a scheduled backup of the group.
If the Backup server cannot make a connection with a client, the Client Retries attribute in the Groups resource specifies the number of times that the server should try to connect to the client before the effort should be considered a failure. The first retry does not occur until after an attempt has been made to contact each client (at a minimum). The Inactivity Timeout attribute in the Groups resource specifies the number of minutes that the Backup server waits for evidence of backup activity on the client. If the server has not received status information for longer than the time specified, the server abandons the backup operation for the save set.
The backup of an abandoned save set might be completed, but the automated report from savegrp does not show that the backup is completed. For example, if the client is being backed up over a network filesystem (NFS) connection and the NFS server crashes and reboots, the Backup backup hangs until it times out. The Backup server marks the save set "abandoned," but when the NFS server comes back up, the backup continues and is completed.
The preconfigured attributes for the Default group are described in "Groups Resource ". You can make changes to any Default group attribute, but you cannot delete the group. You can, however, create or delete as many customized groups as you need.
You can use a group's Level and Schedule attributes to override a client's regular backup schedule. For example, one evening you might want to run a full backup on all the clients in a group, regardless of the clients' regular backup schedules. The entry you make in the Level attribute overrides the backup level setting for every client in the group.
Alternatively, you might want a group of clients to follow the same backup schedule instead of each client's individual schedule. You could assign a group of clients to follow the default schedule (full every Sunday) regardless of each client's individual schedule. If you leave the group's Level and Schedule attributes blank (the preconfigured setting), the clients follow their individual backup schedules.
Use the Group Control window in the Backup administration program to monitor scheduled groups during a backup. The Group Control feature, savegroup completion message, bootstrap printout, and system console log provide information about the success of scheduled backups and the information you need to recover your data.
The Group Control feature provides status information and contains controls for previewing, stopping, and starting scheduled backup groups.
The status information about the most recently started backup group is displayed as one of the following:
Running
Never Run
Finished
Not Finished (indicates the backup has exited without finishing)
Preview Run (indicates the test of the backup configuration)
The Group Control Details feature available in the Backup administration program enables you to view more detailed information about a completed group backup. Use this feature to determine which client save sets were backed up successfully and which save sets failed.
The Group Control Details window displays the status of client save sets in the backup process in one of three message fields:
Pending Save Sets - displays the client save sets that have not yet been backed up.
Completed Save Sets - displays the client save sets that Backup has successfully backed up.
Failed Save Sets - displays the client save sets that Backup did not back up (typically because of a machine or network crash).
You can use the Group Control Preview feature to simulate a backup for a specific group. This feature helps you identify potential problems before Backup runs an upcoming group backup. To preview a backup group with the Backup administration program, display the Group Control window and click the Preview button. To preview a backup group from the command line, become root on the Backup server, then issue the savegrp -p group-name command at the shell prompt.
Backup displays information about how a group will perform during its next scheduled backup, instead of displaying past information about completed group backups.
When you start a scheduled backup group manually (on demand), Backup runs the backup at the level of the next scheduled backup, which can be full, level 1-9, or incremental.
To immediately start a group backup in one of two ways:
In the Backup administration program, click the Start Now button in the Group Control window.
From the command line, become root on the Backup server, then issue the savegrp group-name command at the shell prompt.
When you use the Start Now control, Backup overrides the Groups scheduled start time and immediately backs up the clients in the group.
After you initiate a Stop in the Group Control window, Backup completes its backup of the current save set, halts the rest of the scheduled backup, and displays Not Finished in the Status field in the Group Control window.
After you initiate a Restart through the Group Control window, Backup resumes the scheduled backup for the group and displays Running in the Status field.
If a client's open files change during a scheduled backup, Backup backs up the old version of the files and detects that they are changing. A warning message similar to the following appears in the Group Control Details window:
warning: file filename changed during save |
The changes to the file are not backed up. To back up the changes, you can restart the backup group or allow Backup to back up the client during the next scheduled backup.
When the backup is completed, Backup generates a report about the success of the scheduled backup. Backup sends the root user an automatic notification and displays the same information in the Backup administration program.
When the backup group contains data from the Backup server, Backup generates a special save set called the bootstrap, which includes the server file index, media database, and configuration files. The bootstrap information is essential for recovery from a disaster. By default, the bootstrap is printed to the Backup server's default printer. To change the default printer, change the Printer attribute in the Groups resource.
A bootstrap printout is created with any scheduled backup of a group that includes the server, or after other scheduled backups if the server is not in an active group. A bootstrap printout is generated whether the scheduled backup is initiated automatically or manually.
You can save the bootstrap to a file or email it to one or more user IDs.
Run nwadmin and select Notifications from the Customize menu.
Select Bootstrap.
The Action attribute displays:
/usr/bin/lp -s -c -t bootstrap -d%PRINTER |
Change this to:
/bin/cat >> /directory/filename |
To email the bootstrap file to more than one user IDs, change the line to:
/usr/ucb/Mail -s "nwserver bootstrap" user-name@corp.com |
The UNIX system log displays messages passed from Backup. When Backup is installed, it adds lines to the configuration log file (syslog.conf) to tell the system log facility what types of notices to direct to which file or user. For example:
daemon.notice /dev/console daemon.notice /nsr/logs/messages daemon.notice operator local0.notice /nsr/logs/summary local0.alert root, operator |
The Backup server determines the amount of data to back up for each client system across your network according to the backup schedule you assigned to each client. Schedules can be very simple or very sophisticated, depending on the needs of your environment. All clients can share the same schedule, or each client can have its own schedule. Use the Schedules resource to create customized schedules that you can apply to client save sets through the Clients resource. See Chapter 5, Backup Client Operations for more information about the Clients resource and client configuration.
Backup uses a client's backup schedule to determine what level of backup operation to perform on a given day for the specified save sets. The time of day the backup operation begins is determined by the Start Time assigned to the Group resource with which the client save sets are associated.
Backup supports four different types of backup levels:
Full - backs up all files, regardless of whether they have changed since the last backup operation.
Level 1-9 - backs up files that have changed since the last lower numbered backup level.
Incremental - backs up files that have changed since the last backup, regardless of the level.
Skip - skips the scheduled backup.
(See "Backup Levels " for a detailed description of backup levels.)
Use the Schedules resource to customize backup schedules to best suit your needs. For example, some clients may have data you want to back up at level "full" every three days, with incremental backups in between. Other clients may have less critical data that only needs a full backup once a month, with incremental backups or level 1-9 backups on other days.
The time from one full backup to the next full backup is called a "backup cycle." Figure 3-2 illustrates a weekly backup cycle. In this example, a full backup is performed for a client each Sunday and incremental backups are performed the other days of the week.
You can use backup schedules to balance and stagger the load on your Backup server. Depending on the size of your network, you can apply the same schedule to all clients. For example, if no one works on Sunday and you want to run full backups on that day, you can apply the default schedule to all your clients. The default schedule tells Backup to perform full backups on Sunday and incremental backups the rest of the week. Figure 3-3 illustrates how the default schedule works for three clients: Client A, Client B, and Client C.
Because full backups can take a long time, you may want to stagger them throughout the week. For example, you can apply a schedule that performs a full backup for Client A on Sunday, a second schedule that performs a full backup for Client B on Tuesday, and a third schedule that performs a full backup for Client C on Thursday. Figure 3-4 illustrates how you can use staggered backup schedules for multiple clients.
When you balance and stagger the load on your Backup server, you can increase server efficiency. Using different start times for groups of clients also helps increase server efficiency.
Backup makes it easy to set up your backup schedules. Deciding which backup schedules best fit your environment, however, requires a planned strategy.
When you create backup schedules, consider the following factors:
The amount of data you have to back up
The number of volumes you want to use
The time you have to complete a backup
Whether the number of volumes required to recover from a disaster, such as a disk crash, matter
Additionally, you must determine a policy for recovering files. For example, if users expect to recover any version of a lost file for at least three months (that is, the retention policy is equal to three months), you need to maintain all the save set entries in the media database for three months. On the other hand, if users only expect to recover data from the last month, you can use level 1-9 backups to decrease the quantity of volumes you need to maintain.
The length of time data is available for Backup to recover is determined by the browse and retention policies associated with each client. See "How the Browse and Retention Policies Manage the Data Life Cycle " for more information about how Backup manages the data life cycle.
At a moderate backup rate of 400KB per second, a full backup for a client with 10GB of data takes about 5.5 hours to complete. Consequently, it may not be convenient to complete a scheduled, full backup for client save sets as large as this because of the amount of time the backup takes.
You can schedule the client's disk volumes for backup at different times by separating them into different backup groups. When you split one client's save sets into multiple backup groups, you back up all the client's files, but not all at once. It is less time-consuming than a full backup of all the local data at one time.
To back up the client's filesystems individually, add and configure the same client several times addressing the different filesystems in the Clients resource. For example, configure the first client resource to back up one filesystem, /usr, with one backup schedule in one group, and configure the second client resource to back up another filesystem, /var, with a second backup schedule in another group.
When you create separate backup schedules and explicitly list save sets, any files or filesystems not included in an explicit list are omitted from backup. This includes any new disk volumes that are added to the system. This risk of omission does not exist when you enter the special value "All" in the Save Set attribute; Backup automatically adds the new disk volumes to the backups.
To create a customized backup schedule, you must define the following schedule configuration values in the Schedule resource:
Name - Choose a simple, descriptive name, for example "Monday Full." You cannot change the Name attribute of an existing Schedule resource. For example, if you want to change the schedule "Full Every Friday" to "Full Every Monday," you must create a new "Full Every Monday" schedule. You cannot change the existing schedule to complete full backups on Mondays instead of Fridays, and then edit its name.
Period - Specify how often you want a backup to run. When you select Week, the backup level is applied to that day of the week for all the weeks in the calendar year, for example, full backups every Sunday. When you select Month, the backup level is applied to that day of the month for all months in the calendar year, for example, full backups on the fifteenth of each month. Week is the default setting.
Level - Select the backup level for each day in the period. Valid values for backup level include "full," "incr," and "1-9." See "Backup Levels " for more information on backup levels.
Override - Specify a list of actions and dates overriding an existing backup level for a specific day. For example, you may not want a full backup to run on a holiday. You can override the schedule so the full backup runs on the day before or the day after the holiday.
Force - You might also want to change this incremental setting which is located in the Groups resource. The default setting for this attribute is "Yes." This means an incremental backup will occur if the group is run more than once a day. Set this attribute to "No" to do more than one full backup per day.
If you want to use your own customized schedule, you must configure the schedule before you can associate it with a client or save set in the Clients resource. The start time for your automatic daily scheduled backup is determined by the backup group with which the client save sets are associated. The length of time that the data is available for browsing or recovery is determined by the browse and retention policies you configure for the client's save sets, rather than by the schedule.
Because it may not be practical or efficient for you to run a full level backup every day, Backup enables you to specify the level of the backup operation performed during its automatic, scheduled group backups. Limiting how often you perform a full backup can help maintain server efficiency, while still ensuring that your data is protected. Different backup levels enable you to trade off the number of volumes and amount of time required to complete a backup with the number of volumes and amount of time required to recover from a disk crash.
Backup supports four kinds of backup levels for filesystem data:
Full - backs up all files, regardless of whether they have changed.
Level 1-9 - backs up files that have changed since the last lower numbered backup level, the last full backup being considered a level zero. For example, a level 1 backs up all the files that have changed since the last full backup (considered a level zero). A level 3 backs up all the files that have changed since the last level 2, level 1, or full backup. A level 9 backs up all the files that have changed since the last level 8, 7, 6, 5, 4, 3, 2, 1, or full backup.
Incremental - backs up files that have changed since the last backup, regardless of the level.
Skip - skips the scheduled backup. For example, you may want to skip a backup on a holiday if you know that no one is available to change or add more volumes.
A backup schedule defines what level backup should be done on a given day during a backup cycle. You can apply one or more of these backup levels to customize a backup schedule. If you are considering using backup levels in a customized schedule, consider the following issues to help you make decisions that best suit your environment:
Full backups take more time to complete than incremental backups.
If you have only one storage device and the full backup does not fit on a single piece of media, an operator must be available to monitor the backup and change the media.
Full backups cause the online indexes to grow more rapidly than incremental or level backups.
Level backups serve as checkpoints in your schedules because they collect all the files that have changed over several days, or even weeks, into a single backup session. Using level backups can simplify and speed file recovery.
The online client file indexes, server index, and media database are backed up whenever the Backup server is backed up. In general, they take on the backup level of the server. For example, if the Backup server's backup is a full level, the backup of the online client file indexes, server index, and media database is also a full level; if the Backup server's backup is a level 5, the backup of the online client file indexes, server index, and media database is also a level 5. However, when the server's backup level is incremental, the backup of the online client file indexes, server index, and media database is level 9.
Backup levels work in conjunction with a client's backup schedule. The way you define the backup levels directly affects how long the recovery from a disk crash takes and how many backup volumes you need.
The following paragraphs, accompanied by graphics, illustrate the concept of how Backup backup levels work and the data requirements for recovery in the event of data loss.
On October 2, a full backup runs. On October 3, the incremental backup saves everything that changed since the full backup. On October 4, the incremental backup backs up everything that changed since the 3rd. On October 5, the level 7 backup backs up everything that changed since the full backup. To fully recover from a disk crash on October 5, you need only two volumes: the full volume and the level 7 volume. You no longer need the data on the volumes from October 3 and 4, because the level 7 volume includes that information. (See Figure 3-5.)
On October 6, 7, and 8, the incremental backup backs up everything that has changed since the level 7 backup. On October 9, as shown in Figure 3-6, the level 5 backup backs up everything that changed since the full backup. To fully recover from a disk crash on October 9, you need only two volumes: the full volume and the level 5 volume. You no longer need the data on the volume from the level 7 backup or the subsequent incremental backups because the level 5 volume includes that information.
On October 12, the level 7 backup backs up all the data that changed since the last lower numbered backup, in this case the level 5 backup from October 9. To recover from a disk crash on October 12, you need three volumes: the full volume, the level 5 volume, and the new level 7 volume. (See Figure 3-6.)
On October 16, the level 5 backup backs up all the data that changed since the last lower numbered backup. Because no lower numbered level backup has been performed (for example, levels 1 - 4), the level 5 backup backs up all the data that changed since the full backup. To recover from a disk crash on October 16, you need two volumes: the full volume and the new level 5 volume. (See Figure 3-7.)
Level 1-9 backups help you maintain control over the number of volumes you use. A carefully thought-out backup strategy enables you to recover everything to disk with a minimum number of volumes. The fewer volumes you need to recover from a disk crash, the less time you must spend restoring the disk.
You can also control the size and time it takes to back up your data by using directives, which compress and eliminate unnecessary data from your backups. For example, you can use a directive that tells Backup to skip certain files or filesystems when performing a backup. For more information on directives, see "What Are Directives? ".