Legato Storage Manager Administrator's Guide
Release 9.0.1 for Windows NT and Windows 2000

Part Number A90174-01

Home

Book List

Contents

Index

Master Index

Feedback

Go to previous page Go to next page

4
Backup and Restore Operations

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.

This chapter contains these topics:

Roadmap for Oracle Backups and Restores

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.


Note:

You will be able to use LSM to restore only Oracle data that has been backed up according to the instructions in this chapter. 


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 Oracle Enterprise Manager 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 such as parameter and password files. For more information on these files and their backup methods, refer to the Oracle9i User-Managed Backup and Recovery Guide.

LSM Environment Variables

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.

Table 4-1 LSM Environment Variables in the RMAN Script 
Variable  Description  Default and Valid Values 

NSR_CHECKSUM 

  • Value of TRUE specifies that LSM perform checksumming on the data

  • Value of FALSE specifies no checksumming

 
  • FALSE (default)

  • TRUE

 

NSR_COMPRESSION 

  • Value of TRUE specifies that LSM perform compression on the backup data

  • Value of FALSE specifies no compression

 
  • FALSE (default)

  • TRUE

 

NSR_DEBUG_FILE 

  • Optional; only used for debugging purposes

  • Enables debugging by specifying the complete path name of a file to receive debugging output

  • If undefined (by default), no debugging information is generated

 
  • Undefined (default)

  • Valid path name of the debug file

 

NSR_ENCRYPTION 

  • Value of TRUE specifies that LSM perform encryption on the backup data

  • Value of FALSE specifies no encryption

 
  • FALSE (default)

  • TRUE

 

NSR_SAVESET_EXPIRATION 

  • Date when the save set will expire

  • If 0 (default), save set will never expire

 
  • 0 (default)

  • Valid date in
    nsr_getdate(3) format

 

RMAN Commands

The Oracle9i RMAN commands described as follows are dependent on the LSM Media Management implementation. Be sure to review the following information before you use any of these RMAN commands.

Proxy Copy

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 Oracle9i Recovery Manager User's 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.

Send Command

LSM does not support the use of the send command.

Trace Option of the Backup 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 result 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.

Table 4-2 Trace Option Values and Conditions Traced
Trace Value  Conditions Traced 

0 (default) 

  • All error conditions

 

  • All error conditions

  • Entry and exit for each SBT function (the Legato implementation of the Oracle SBT interface)

 

  • All error conditions

  • Entry and exit for each SBT function (the Legato implementation of the Oracle SBT interface)

  • Values of all function parameters

  • First 32 bytes of each read/write buffer

 

Pool Option of the Backup Command

LSM does not support the pool option of the RMAN backup command, with the exception of pool=0.

If you specify any nonzero 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

Duplex Option of the Set Command

LSM does not support the use of the set duplex command.

Creating RMAN Scripts

You must create an appropriate RMAN script to perform the desired type of Oracle backup or restore operation on the Oracle9i 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 Oracle9i Recovery Manager User's Guide.

For example, the following RMAN script performs an Oracle9i 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.Foot 1


Note:

To ensure that a specific LSM environment variable is set during your Oracle backup or restore, set that variable in the RMAN script. 


As another example, the following RMAN script performs an Oracle9i 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 Oracle9i Recovery Manager User's 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.


Note:

When you set an LSM environment variable in the RMAN script, as shown in the previous script example, the value of that LSM variable remains in effect for all subsequent allocated channels and for all subsequent RMAN scripts until either:
- Oracle is shut down; or
- the LSM variable is "unset" for the channel using the parms
argument, as in the following example:
run {
allocate channel t1 type 'SBT_TAPE'
parms 'ENV=(NSR_DEBUG_FILE=)';
:
release channel t1;
}
 


In the previous RMAN backup script example, the format string FULL_%d_%u specifies the name of each backup piece. This name can be anything, as long as 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 Oracle9i Recovery Manager User's Guide. For details on how to use the Oracle Enterprise Manager 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 Oracle9i.

Running Oracle Backups or Restores

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 the Windows command to run RMAN is rman for Oracle9i. For more information on the command line options available with the rman command, refer to Oracle9i Recovery Manager Reference.

Using Oracle Enterprise Manager Backup Management Tools

You can use Oracle Enterprise Manager Backup Management Tools instead of the RMAN command-line interface to start an Oracle backup or restore. Oracle Enterprise Manager 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.

Oracle Enterprise Manager Backup Management Tools provide a much simpler interface for running Oracle backups and restores. In Oracle9i, Oracle Enterprise Manager Backup Management Tools generate the required RMAN commands.

For information on how to use Oracle Enterprise Manager Backup Management Tools, refer to the Oracle Enterprise Manager Administrator's Guide and the other Oracle Enterprise Manager documentation included with your product kit.

Multiplexing During RMAN Backups

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 after the LSM installation.

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.

LSM Server Bootstrap Backups

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.


Note:

Note that if the LSM system is down at the time that the automatic bootstrap backup is scheduled to run, the backup will run when the system comes back up. 


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.

Automatic Bootstrap Backup

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:

  1. Run the LSM Administrator GUI.

  2. Click the Configure tab in the Server window (of the main Administrator window) to make it active.

  3. Click Manage Groups to open the Groups window. The Groups window lists the single group resource named Default.

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:

  1. In the Groups window, right-click the icon of the Default group and select Edit from the pop-up menu to open the Edit Group dialog box.

  2. In the Edit Group dialog box, the General (default) tab shows the attributes of the Default group resource. Click Field Help to learn more about each attribute.

The Edit Group dialog box on Windows lists all the attributes of the group resource, as shown in Figure 4-1.

Figure 4-1 Edit Group Dialog Box


Text description of nt_group.gif follows.
Text description of the illustration nt_group.gif

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.


Note:

Be sure that the Autostart attribute is set to Enabled to enable the automatic bootstrap backup. If Autostart is set to Disabled, the bootstrap backup does not run. 


Information confirming the completion of the automatic bootstrap backup is displayed in the Messages section of the Monitor window in the LSM Administrator GUI.

Manual Bootstrap Backup

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.


Note:

Be sure to have a writable media device available before you start a manual bootstrap backup. If you attempt to run the savegrp command for a manual bootstrap backup without an available device, the backup will fail. In that case, you must provide the writable media device and then rerun the savegrp command, to restart the manual bootstrap backup. 


Refer to savegrp in the Legato Storage Manager Command Reference Guide for Windows 2000 and Windows NT provided with LSM on Windows. For details on how to access the Legato Storage Manager Command Reference Guide for Windows 2000 and Windows NT, 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.

Maintaining Bootstrap Information

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 the previous section, "Manual Bootstrap Backup", 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

Monitoring Oracle Backups and Restores

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.

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.

Figure 4-2 Oracle Backup Messages


Text description of nt_backu.gif follows.
Text description of the illustration nt_backu.gif


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.


Go to previous page Go to next page
Oracle
Copyright © 1996-2001 Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents

Index

Master Index

Feedback