Legato Storage Manager Administrator's Guide Release 3 (8.1.7) for Windows 2000 and Windows NT Part Number A85274-01 |
|
This chapter presents information about using LSM for Oracle backup and restore operations after you have configured the requisite LSM resources in the LSM Server. It provides details on how to set up and run Oracle backups and restores as well as details on LSM Server bootstrap backups. The methods for monitoring Oracle backups and restores by means of the LSM Administrator GUI and specific log files are also outlined.
The preceding chapters of this guide outline the procedures for configuring LSM for Oracle backup and restore operations. After applying the information in the "Configuration Roadmap", the LSM Server should have all the required client, server, device, and volume pool resources configured. There should also be a labeled volume mounted in each configured backup device--or, if auto media management is enabled for a tape device, a tape loaded in the tape device for LSM to use automatically.
As explained in "Overview of LSM Features" , you can perform the Oracle data backup or restore operation using either the RMAN command-line interface or OEM Backup Management Tools:
For important additional considerations for RMAN backups, see "Multiplexing During RMAN Backups".
Note: The LSM bootstrap is a special backup set essential for disaster recovery procedures. The LSM Server is preconfigured to perform an automatic daily bootstrap backup. After running a number of Oracle backups, a manual bootstrap backup is also recommended. For more information, see "LSM Server Bootstrap Backups".: |
You can use the information in "Monitoring Oracle Backups and Restores" to keep track of the status of your Oracle backup and restore operations.
In addition to performing Oracle database backups using the appropriate RMAN scripts as described in this chapter, you should back up other important Oracle files (for example, initoracle_sid.ora) using regular filesystem backups. For more information, refer to the Oracle Backup and Recovery Guide.
LSM provides several environment variables that you can set for your particular type of Oracle backup or restore. See Table 4-1 for a description of the environment variables. LSM environment variables are all optional.
For LSM environment variables to be in effect during the Oracle backup or restore operation, you must set the variables in the RMAN backup or restore script itself. Setting the variables in the environment using the Windows command set
has no effect.
Contrary to statements in the Oracle documentation, you must set an LSM variable using the parms
argument in each allocate channel
command in your RMAN script. Be sure to set the LSM variable for each channel. Also, specify the variable name in uppercase, for example, NSR_DEBUG_FILE instead of
Nsr_Debug_File. Setting an LSM variable in the backup
command in the RMAN script has no effect. For more information on setting the LSM variables in the RMAN script, see "RMAN Commands".
Table 4-1 describes all the available LSM environment variables, which can be set only in the RMAN script. The table includes a description of each variable, the default value of the variable, and the valid values you can assign to the variable in the RMAN script.
Variable | Description | Default and Valid Values |
---|---|---|
NSR_CHECKSUM |
||
NSR_COMPRESSION |
||
NSR_DEBUG_FILE |
||
NSR_ENCRYPTION |
||
NSR_SAVESET_EXPIRATION |
The Oracle8i RMAN commands described below are dependent on the LSM Media Management implementation. Be sure to review the following information before you use any of these RMAN commands.
LSM does not support proxy copy. The proxy only
option of the RMAN backup
command will cause the Oracle backup to fail.
Contrary to statements in the Oracle Backup and Recovery Guide, the proxy
option of the RMAN backup
command will also cause backup failure. This option will not default to a regular backup. To perform a regular backup, you must not specify the proxy
or proxy only
option.
LSM does not support the use of the send
command.
You can set the trace
option of the RMAN backup
command to the value 0, 1, or 2. The default value of trace
is 0.
The output of trace
is written to the Windows file named %SystemDrive%\win32app\nsr\applogs\dmo.messages.
The following table outlines the conditions traced when you set the trace
option to each of the three valid values.
Trace Value | Conditions Traced |
---|---|
0 (default) |
|
1 |
|
2 |
LSM does not support the pool
option of the RMAN backup
command, with the exception of pool=0
.
If you specify any non-zero value for the pool
option of the RMAN backup
command, the RMAN session will terminate and LSM will return the following error message:
Oracle pool is not supported
LSM does not support the use of the set duplex
command.
You must create an appropriate RMAN script to perform the desired type of Oracle backup or restore operation on the Oracle8 or Oracle8i system.
You can store your RMAN scripts as flat ASCII files. Alternatively, if you are using a Recovery Catalog, you can store your scripts in the Recovery Catalog database. For more information on storing RMAN scripts in the Recovery Catalog database, refer to the Oracle Backup and Recovery Guide.
For example, the following RMAN script performs an Oracle8 or Oracle8i backup of the entire database and specifies that RMAN-specific debugging information be written to the file C:\win32app\nsr\applogs\backup.log.
run { allocate channel t1 type 'SBT_TAPE'
parms 'ENV=(NSR_DEBUG_FILE=C:\win32app\nsr\applogs\backup.log)'; allocate channel t2 type 'SBT_TAPE'
parms 'ENV=(NSR_DEBUG_FILE=C:\win32app\nsr\applogs\backup.log)'; backup full filesperset 4
format 'FULL_%d_%u'
(database); release channel t1; release channel t2; }
You must set the type
argument in the RMAN command allocate channel
to SBT_TAPE
. This value specifies an LSM Media Management device.1
As another example, the following RMAN script performs an Oracle8 or Oracle8i restore of an Oracle tablespace and specifies that RMAN-specific debugging information be written to the file C:\win32app\nsr\applogs\restore.log.
run { allocate channel t1 type 'SBT_TAPE'
parms 'ENV=(NSR_DEBUG_FILE=C:\win32app\nsr\applogs\restore.log)'; allocate channel t2 type 'SBT_TAPE'
parms 'ENV=(NSR_DEBUG_FILE=C:\win32app\nsr\applogs\restore.log)'; sql 'alter tablespace users offline immediate'; restore (tablespace users); sql 'alter tablespace users online'; release channel t1; release channel t2; }
To use any of the optional LSM environment variables described in "LSM Environment Variables", you must set them in the RMAN script.
Contrary to statements in the Oracle Backup and Recovery Guide, each LSM environment variable you set in the RMAN script must be included in the parms
option for each allocated channel. You cannot set the LSM variables at the system command line, for example, using a set
command.
In the RMAN backup script example above, the format
string FULL_%d_%u
specifies the name of each backup piece. This name can be anything, provided that each backup piece has a unique name on the LSM Server. You can use substitution variables such as %d
and %u
to guarantee unique names. Note that a format
string such as FULL
or FULL_%d
will not generate unique names. Similarly, the format
string FULL_%s
will not generate unique names for two databases being backed up to the same LSM Server.
For more details on how to write RMAN scripts, refer to the Oracle Backup and Recovery Guide. For details on how to use the OEM Backup Wizard to generate RMAN scripts, refer to your Oracle Enterprise Manager documentation. Also, see "RMAN Commands" for important Legato-specific information about RMAN commands in Oracle8i.
Chapters 2 and 3 explain how to configure LSM for backup and restore operations.
After applying the information in the "Configuration Roadmap", the LSM Server should have all the required client, server, device, and volume pool resources configured. There should also be a labeled volume mounted in each configured backup device--or, if auto media management is enabled for a tape device, a tape loaded in the tape device for LSM to use automatically.
The Oracle Server should also have the TNS Listener (you will most probably use one) configured. If you will be using a Recovery Catalog, you should have the Recovery Catalog set up and the target database registered.
With these configurations in place and an RMAN script created as described in "Creating RMAN Scripts", you can start an Oracle backup or restore using the RMAN command line interface on the Oracle Server.
For example, if the RMAN backup script is stored in the file C:\disk1\scripts\full_backup.txt on an Oracle Server and the TSN Listener has been configured to connect to the databases payroll and rcvcatdb, you can run the Oracle backup using the following command:
% rman target internal/oracle@payroll rcvcat rman/rman@rcvcatdb cmdfile C:\disk1\scripts\full_backup.txt
As another example, if the RMAN restore script is stored in the file C:\disk1\scripts\restore.txt on an Oracle Server and the TSN Listener has been configured to connect to the databases payroll and rcvcatdb, you can run the Oracle restore using the following command:
% rman target internal/oracle@payroll rcvcat rman/rman@rcvcatdb cmdfile C:\disk1\scripts\restore.txt
Note that theWindows command to run RMAN is rman80
for Oracle8 and rman
for Oracle8i. For more information on the command line options available with the rman
or rman80
command, refer to the Oracle Backup and Recovery Guide.
You can use Oracle Enterprise Manager (OEM) Backup Management Tools instead of the RMAN command-line interface to start an Oracle backup or restore. OEM Backup Management Tools include a graphical user interface to RMAN that enables you to perform backup and restore operations through a point-and-click method.
OEM Backup Management Tools provide a much simpler interface for running Oracle backups and restores. In Oracle8 and Oracle8i, OEM Backup Management Tools generate the required RMAN commands.
For information on how to use OEM Backup Management Tools, refer to the Oracle Enterprise Manager Administrator's Guide and the other Oracle Enterprise Manager documentation included with your product kit.
To prevent LSM from multiplexing multiple RMAN backup sets to one tape drive, only allocate as many RMAN "channels" as there are physical tape drives available to LSM.
Allocating more channels than physical tape drives will typically result in multiplexed RMAN backup sets to one drive, which might significantly add to the time required to restore from those backups. To clarify, the multiplexing performed by LSM (when allocating more channels than physical devices) would be in addition to the multiplexing automatically performed by RMAN.
The Target sessions attribute of a device resource configured in the LSM Server is described in "Creating a Device Resource". The Target sessions value is not a hard limit on the number of sessions that will run concurrently on the device. It defines the number of sessions that LSM allocates to a device before using the next device. The Target sessions attribute value defaults to 1 for devices created during the initial installation of LSM as well as for devices created afterwards.
If more concurrent backup sets are created than the number of available devices, LSM will multiplex those backup sets onto the available devices, up to the maximum number of sessions specified in the parallelism value of the server resource.
Note that the "client parallelism" attribute does not apply to LSM sessions initiated by RMAN.
As mentioned in "Overview of LSM Operations" , the LSM Server is preconfigured to perform a special automatic backup--the LSM Server bootstrap backup--every day at 3:33 a.m. The bootstrap contains the information needed to restore the following three components to the point just before the bootstrap was created:
From these three components, the complete LSM Server environment can be recreated.
The bootstrap is a special backup set essential for disaster recovery procedures on the LSM Server. LSM writes the bootstrap file to the backup media and generates a report about the success of the bootstrap backup. LSM sends an automatic notification to the administrator about the bootstrap backup and displays the same information in the LSM Administrator GUI. Also, bootstrap information is sent to a printer on the LSM Server.
You can also run the bootstrap backup manually. For example, after finishing the last of many Oracle backups performed during a day, it would be advisable to manually run a bootstrap backup, to ensure that you have an up-to-date bootstrap. An up-to-date bootstrap is essential for a complete disaster recovery on the LSM Server.
The next section, "Automatic Bootstrap Backup", contains instructions on how to verify that the LSM Server is properly configured for the automatic bootstrap backup. For information on how to run the bootstrap backup manually, see "Manual Bootstrap Backup". "Maintaining Bootstrap Information" has details on the critical bootstrap information you need to keep for future disaster recovery procedures.
Chapter 5, "Disaster Recovery" contains complete details on how to use the LSM Server bootstrap during a disaster recovery.
To verify that the LSM Server configuration is properly set up for the automatic bootstrap backup, you need to run the LSM Administrator GUI. See "Using the LSM Administrator GUI" for details about running the GUI on Windows.
Then, you need to verify that the client resource and Default group resource are both configured correctly. For information about accessing the client resource, see "Client Resource" . In the client resource, be sure that the Group attribute is set to Default.
Finally, check the Default group resource configuration. To open the Groups window, perform the following steps:
On Windows, the Groups window does not automatically show the attribute settings of the group resource, so you must perform the following additional steps to see the group's attributes:
The Edit Group dialog box on Windows lists all the attributes of the group resource, as shown in Figure 4-1.
The Start time attribute specifies when the bootstrap backup is configured to begin--3:33 a.m. by default. To have the bootstrap information sent to a specific printer, set the Printer attribute to the name of that printer.
Information confirming the completion of the automatic bootstrap backup is displayed in the Messages section of the Monitor window in the LSM Administrator GUI.
If you want to manually run the bootstrap backup on a Windows system, you must be logged in as Administrator. Then, enter this savegrp
command at the system prompt:
savegrp -O -l full -P printer_name -c server_name
Here, printer_name is the name of the printer where the bootstrap information is printed at the end of the bootstrap backup. Also, server_name is the hostname of the LSM Server.
Refer to savegrp
in the Legato Command Reference Guide provided with LSM on Windows. For details on how to access the Legato Command Reference Guide, see "Legato Command Reference Guide" .
Note that information confirming the completion of the manual bootstrap backup is displayed in the Messages section of the Monitor window in the LSM Administrator GUI.
At the end of the automatic daily bootstrap backup, LSM prints the bootstrap information to the printer specified in the Printer attribute of the Default group resource; or, if that Printer attribute is blank, to the default printer.
At the end of a manual bootstrap backup run with the savegrp
command, as described in "Manual Bootstrap Backup" above, the bootstrap information is sent to the printer specified in that savegrp
command.
Be sure to store the bootstrap printout in a safe place. The printed bootstrap information includes dates, locations, and save set ID numbers for the bootstrap save sets backed up during the past month. With this information, you can determine which volumes are needed to recover the LSM Server indexes and resource database files during a disaster recovery.
An example of a bootstrap printout is as follows:
August 20 03:30 1999 LSM bootstrap information Page 1 date time level ssid file record volume 8/19/99 2:29:08 9 1148868949 56 0 jupiter.005 8/20/99 2:52:25 9 1148868985 77 0 jupiter.001
You can use the LSM Administrator GUI to monitor the status of Oracle backup and restore operations. In the GUI on Windows, the messages appear in the Monitor window.
You can view progress messages that appear during the backup or restore and completion messages that advise when the backup or restore is complete. You can also view the messages in specific online system files.
msglog
parameter in the RMAN command, as in the following example:
% rman target ... rcvcat ... msglog
filename
The following example shows the types of messages displayed in the Sessions and Messages sections of the Monitor tab in the main LSM Administrator window during Oracle backups.
1
If you allocate a device using the command allocate channel t1 type disk (with Oracle correctly configured and LSM uninstalled), you can back up to disk files using the Oracle backup implementation. In this case, the parms option has no effect.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|