Sei sulla pagina 1di 6

Netbackup 5.

0 process communication
Backup and Archive Processes The backup and archive processes vary depending on the type of client. The following explains the basic variations, and describes the synthetic backup process. There is also a description of how NetBackup operates when backing up its databases. Backups and Archives - UNIX Clients For UNIX clients, NetBackup supports scheduled, immediate manual, and user-directed backups of both files and raw partitions. User-directed archives of files is also supported (you cannot archive raw partitions). Once started, these operations are all similar to the extent that the same daemons and programs execute on the server (see the figure below, Backup or Archive to Tape or Optical). Each type, however, is started differently. Scheduled backup operations begin when the NetBackup request daemon, bprd, activates the scheduler, bpsched. This occurs at intervals determined by the Wakeup Interval global attribute. Once activated, the scheduler checks the policy configurations for scheduled client backups that are due. Immediate manual backups begin if the administrator chooses the manual backup option in the NetBackup administrator interface. This causes bprd to start bpsched, which then processes the policy, client, and schedule selected by the administrator. User-directed backups or archives begin when a user on a client starts a backup or archive through user interface on the client (or the bpbackup or bparchive commands). This invokes the clients bpbackup or bparchive program, which sends a request to the request daemon bprd on the master server. When bprd receives the user request, it starts bpsched, which checks the policy configurations for schedules and by default chooses the first user-directed schedule that it finds in a policy that includes the requesting client. It is also possible to specify a policy and schedule by using the NetBackup configuration options, BPBACKUP_POLICY and BPBACKUP_SCHED, on the client. For all three types of backup and archive operations, bpsched uses the client daemon (bpcd)to start the backup/restore manager (bpbrm). The Scheduler (bpsched) starts the backup/restore manager on the media server, which may or may not be the same system as the master server. The backup/restore manager starts the appropriate media manager process (bptm for tape or optical and bpdm for disk) and also starts the actual backup (or archive) by using the client daemon (bpcd) to start the backup and archive program (bpbkar) on the client. The bpbkar program: Sends information about files within the image to the backup/restore manager, which directs the file information to the NetBackup file database.

Transmits the backup image to the media manager process, bptm or bpdm. The bptm or bpdm process forks a second process, which receives the image and stores it block by block in shared memory. The original process then takes the image from shared memory and directs it to the storage media. If the storage is tape or optical, bptm checks the NetBackup media database for a suitable media ID (for example, the correct density and retention level). If it cant find one, it obtains a new media ID from the Media Manager volume daemon, vmd. The bptm program includes the media ID in a tape request to the Media Manager device daemon, ltid, which finds the physical media and causes it to be mounted on an appropriate device. bptm also controls the spanning of backups across multiple tapes, if required. If the storage media is disk, bpdm writes the images to the path configured in the disk storage unit. The system disk manager controls the actual writing of data. In the case of an archive, NetBackup deletes the files from the client disk after the files have been successfully backed up. For multiplexed backups, the process is essentially the same except that a separate bpbrm and bptm process is created for each backup image being multiplexed onto the media. NetBackup also allocates a separate set of shared memory blocks for each image. NetBackup Database Backups It is possible to configure automatic database backups to occur either: After each scheduled backup session that results in the creation of at least one backup image. Or After scheduled, user-directed, or manual backup or archive sessions that result in the creation of at least one backup or archive image. For automatic database backups, NetBackup uses the scheduler, bpsched, to determine if any backups are required. The scheduler is activated by the request daemon, bprd, at intervals determined by the Wakeup Interval global attribute. If a backup is needed, bpsched uses the client daemon, bpcd, to start the database backup program, bpbackupdb. For a manual database backup, NetBackup invokes bpbackupdb directly, without going through bprd or the scheduler. Once started, bpbackupdb: 1. Queries bpdbm for the database paths to back up and the media ID to use for the backup. 2. Starts the tape and optical manager, bptm, and sends it the media ID in a special mount request. The tape and optical manager, bptm, recognizes the request as being for a database

backup and checks the database to ensure that the media ID is not one used for regular backups. The bptm program then includes the media ID in a request to the Media Manager device daemon, ltid. The device daemon finds the media and causes it to be mounted on an appropriate device. 3. Starts the actual backup by using bpcd to start the backup program, bpbkar. If the database is on the master server, bpbackupdb starts the backup and archive program on the master server. If the database is on a media server, bpbackupdb starts the backup and archive program on the media server.

The original bpbackupdb process receives the backup image and sends it to the backup device. A second bpbackupdb process checks the file information to ensure that the proper files are being backed up. The entire database backup must fit on a single tape. The bpbackupdb process is unable to span tapes and there is no mechanism for specifying multiple tapes for an NetBackup database backup. If any part of the database backup fails, then NetBackup discards the entire backup. This is done because you must have a backup of all the databases to be certain that you have a consistent database.

Restore Processes
Before starting a restore operation, a user will usually browse the file database and list the files available in the backup images. The desired files can then be selected from the list. The browsing is done through the bplist program on the client. The bplist program can be started directly from the command line and is used by the NetBackup user interface programs.bplist obtains the file list by sending a query to the request daemon, bprd, on the master server The request daemon, in turn, queries bpdbm for the information and transmits it to bplist on the client. When the user starts a restore, NetBackup invokes the clients bprestore program which sends a request to the request daemon, bprd (see the graphic Restore Operation from Tape or Optical). This request identifies the files and client. The request daemon then uses bpcd (client daemon) to start the backup/restore manager (bpbrm). Note To restore Backup Exec images, bpbrm will invoke mtfrd instead of tar on the clients. The server processes are the same as those used for NetBackup restores. If the storage unit on which the files reside attaches to the master server, then bprd starts the backup/restore manager on the master server. If the storage unit connects to a media server, bprd starts the backup/restore manager on the media server. The backup/restore manager starts the appropriate media manager process (bptm for tape or optical or bpdm for disk) and uses the client daemon (bpcd) to establish a

connection between the NetBackup tar program on the client and bptm or bpdm on the server. The bptm (for tape or optical) or bpdm (for disk) process obtains the location of the data (media ID or file path) and then starts retrieving data. During retrieval, the original bptm or bpdm process stores the image block by block in shared memory. A second bptm or bpdm process transmits the image to the client. If the storage medium is tape or optical, bptm includes the media ID in a tpreq command to the Media Manager device daemon, ltid. The device daemon finds the physical media and causes it to be mounted on an appropriate device. The bptm program reads the image and directs it to the client, where the NetBackup tar program writes it on the client disk. If the storage medium is disk, bpdm uses the file path in a read request to the system disk manager. The image is then read from disk and transmitted to the client, where the NetBackup tar program writes it on the client disk. Only the part of the image that is required to satisfy the restore request is sent to the client, not necessarily the entire backup image.