Oracle® Application Server 10g Administrator's Guide
10g (9.0.4) Part No. B10376-02 |
|
![]() |
![]() |
This chapter provides information on getting started with Oracle Application Server backup and recovery.
It contains the following topics:
What is the Oracle Application Server Backup and Recovery Tool?
Backup and Recovery Considerations for High Availability Environments
This section introduces the philosophy for backing up and recovering your Oracle Application Server environment.
A typical Oracle Application Server environment contains:
An Infrastructure installation that contains Identity Management and a Metadata Repository
One or more middle-tier installations (J2EE and Web Cache, Portal and Wireless, or Business Intelligence and Forms) that may use the Infrastructure
The installations in an Oracle Application Server environment are interdependent in that they contain configuration information, applications, and data that are kept in sync. For example, when you perform a configuration change, you might update configuration files in the middle-tier installation and Infrastructure; when you deploy an application, you might deploy it to all middle-tier installations; and when you perform an administrative change on a middle-tier installation, you might update data in the Metadata Repository.
It is, therefore, important to consider your entire Oracle Application Server environment when performing backup and recovery. For example, you should not back up your middle-tier installation on Monday and your Infrastructure on Tuesday. If you lose files in your middle-tier installation, you could restore it to Monday's state. However, your Infrastructure would be in its current state—out of sync with the middle tier. And, because you backed up the Infrastructure on Tuesday, you would have no means of restoring it to a state in sync with Monday's middle-tier installation. You would not be able to restore your environment to a consistent state.
Instead, you should back up your entire Oracle Application Server environment at once. Then, if a loss occurs, you can restore your entire environment to a consistent state.
For the purposes of backup and recovery, you can divide your Oracle Application Server environment into different types of files, as shown in Figure 11-1.
Figure 11-1 Types of Files for Oracle Application Server Backup and Recovery
The types of files for backup and recovery are:
Oracle software files
These are static files such as binaries and libraries. They reside in the middle-tier and Infrastructure Oracle homes. They are created at installation time.
Configuration files
These files contain configuration information and deployed applications. They reside in the middle-tier and Infrastructure Oracle homes. They are created at installation time and are updated during the normal operation of your application server.
Metadata Repository files
These are the datafiles and control files that make up your Metadata Repository. They reside in the Infrastructure Oracle home. They are created at installation time and are updated during the normal operation of your application server.
Oracle system files
These files may be in the /var/opt/oracle
or /etc
directory, and the oraInventory
directory. They exist on each host in your Oracle Application Server environment. They usually reside outside of your Oracle Application Server installations, although the oraInventory
directory may be in an Oracle home. They are created and updated by Oracle Universal Installer at installation time and contain information about your installations.
The strategies and procedures in this book involve backing up and recovering these different types of files in a manner that maintains your Oracle Application Server environment in a consistent state.
Note: Your Oracle Application Server environment contains additional files to those mentioned in this section, such as log files; database configuration files, includingtnsnames.ora , listener.ora , sqlnet.ora , orapwd , and spfile/pfile ; and additional files you may deploy in the Oracle home, such as static HTML files and CGI scripts.
The tools and procedures in this book do not cover these files. Oracle recommends you protect yourself from loss of these files using your routine filesystem backup procedures. |
This section describes the backup strategy used in this book. It contains the following topics:
The Oracle Application Server backup strategy involves two types of backups:
Complete Oracle Application Server Environment Backup
A complete Oracle Application Server environment backup includes:
A full backup of all files in the middle-tier Oracle homes (this includes Oracle software files and configuration files)
A full backup of all files in the Infrastructure Oracle home (this includes Oracle software files and configuration files)
A complete cold backup of the Metadata Repository
A full backup of the Oracle system files on each host in your environment
In Figure 11-2, the files that are backed up during a complete Oracle Application Server environment backup are shaded. The complete Oracle Application Server environment backup includes everything necessary to restore the initial installation of your Oracle Application Server environment. You must shut down your Oracle Application Server environment before performing this backup.
Figure 11-2 Files Backed Up in a Complete Oracle Application Server Environment Backup
Online Backup
An online backup includes:
An incremental backup of the configuration files in the middle-tier Oracle homes.
An incremental backup of the configuration files in the Infrastructure Oracle home
An online backup of the Metadata Repository
In Figure 11-3, the files that are backed up during an online backup are shaded. The online backup involves saving the configuration information, applications, and data across your entire Oracle Application Server environment at the same point in time. You can leave your Oracle Application Server up while performing an online backup.
This section outlines the recommended strategy for performing backups. Using this strategy ensures that you will be able to perform the recovery procedures in this book.
Perform a complete Oracle Application Server environment backup.
Immediately after you install Oracle Application Server, you should perform a complete Oracle Application Server environment backup. This backup contains everything you need in order to restore your environment to its initial state. It servers as a baseline for all subsequent online backups.
Perform online backups on a regular basis.
After every administrative change, or, if this is not possible, on a regular basis, perform an online backup of your Oracle Application Server environment. This will enable you to restore your environment to a consistent state as of the time of your most recent online backup.
See Also: Appendix G, "Examples of Administrative Changes" to learn more about administrative changes |
After a major change, perform a new complete Oracle Application Server environment backup.
If you make a major change to your Oracle Application Server environment, perform a new complete Oracle Application Server environment backup. This backup will serve as the basis for subsequent online backups.
Perform a new complete Oracle Application Server environment backup after:
An operating system software upgrade
An Oracle Application Server software upgrade or patch application
Perform online backups on a regular basis.
After you establish a new complete Oracle Application Server environment backup, return to Step 2 and continue to perform online backups on a regular basis.
There are two types of Oracle Application Server recovery strategies used in this book:
Recovery Strategies for Data Loss, Host Failure, or Media Failure (Critical)
Recovery Strategies for Process Crashes or System Outages (Non-Critical)
Recovery Strategies for Data Loss, Host Failure, or Media Failure (Critical)
These strategies enable you to recover from critical failures that involve actual data loss. Depending on the type of loss, they can involve recovering any combination of the following types of files:
Oracle software files
Configuration files
Metadata Repository files
Oracle system files
In all cases, these strategies involve making sure your state is consistent across all installations.
Recovery Strategies for Process Crashes or System Outages (Non-Critical)
These strategies involve restarting processes that have stopped or failed. They do not involve restoring data. They are included in this book for completeness.
The Oracle Application Server Backup and Recovery Tool (OracleAS Backup and Recovery Tool) is a Perl script and associated configuration files. You can use the tool to backup and recover the following types of files:
Configuration files in the middle-tier and Infrastructure Oracle home
Metadata Repository files
The OracleAS Backup and Recovery Tool is available on the "OracleAS RepCA and Utilities" CD-ROM. Instructions for installing and configuring the tool are in Chapter 12, "Oracle Application Server Backup and Recovery Tool".
The following assumptions and restrictions apply to the backup and recovery procedures in this book:
The following installation types are supported:
J2EE and Web Cache
Portal and Wireless
Business Intelligence and Forms
Infrastructure (Identity Management and Metadata Repository)
Infrastructure (Identity Management only)
Infrastructure (Metadata Repository only)
OracleAS TopLink (Standalone or installed into a middle-tier Oracle home)
OracleAS ProcessConnect
Oracle Content Management Software Development Kit
Warning: You cannot use the OracleAS Backup and Recovery Tool on a Metadata Repository that was created by running Oracle Application Server Repository Creation Assistant (OracleAS RepCA) on an existing database. You must backup and recover that type of Metadata Repository using standard database backup and recovery.
The procedures in this book assume the Metadata Repository is a single instance database. If you are using OracleAS Cold Failover Cluster, OracleAS Active Failover Cluster, or Disaster Recovery, refer to Section 11.7, "Backup and Recovery Considerations for High Availability Environments" for special considerations.
If you would like to use the OracleAS Backup and Recovery Tool in a standalone OracleAS TopLink installation, you must manually edit config.inp
and set config_files_list
as follows:
config_files_list=config_toplink_files.inp,config_misc_files.inp
Refer to Section 12.4, "How to Configure the OracleAS Backup and Recovery Tool".
Distributed Configuration Management (DCM) is a framework for managing configuration information for application server instances, OracleAS Clusters, and the following components: Oracle HTTP Server, OC4J, OPMN, and JAZN.
This section discusses features of DCM that require consideration when performing backup and recovery. It contains the following topics:
All middle-tier instances that are part of a farm use a DCM repository. The DCM repository contains configuration information and deployed J2EE applications.
There are two types of DCM repositories:
Database repository—this is stored in the DCM schema in a Metadata Repository.
File-based repository—this is stored on the filesystem in the Oracle home of one middle-tier instance in the farm, known as the repository host instance.
If your environment contains a database repository, you do not need to perform any special steps because the repository will be backed up and recovered during normal Metadata Repository backup and recovery.
If your environment contains a file-based repository, there are some special considerations for backup and recovery.
Backup Considerations for DCM File-based Repositories
When you back up the middle-tier instance that contains the file-based repository (the repository host instance), you should perform an additional step to create a backup of the file-based repository. Then, in case you lose the instance, you can recover the repository. The steps for creating the repository backup are included in the backup procedures in this book.
You can identify the repository host instance using the following command:
ORACLE_HOME/dcm/bin/dcmctl whichFarm
This command returns a Repository Type of "Distributed File Based (host)" when run in the Oracle home of the repository host instance.
Recovery Considerations for DCM File-based Repositories
If you lose the repository host instance, you must restore the file-based repository as part of restoring the instance. If you restore the instance to a new host, you must perform an additional step to notify the other members of the farm that the repository is on a new host. These steps are included in the recovery procedures in this book.
See Also: Oracle Application Server 10g High Availability Guide for more information on DCM file-based repositories |
A DCM archive is a snapshot of the configuration of an Oracle Application Server instance or cluster at a particular point in time. You can apply archived configurations to the same instance or cluster, or to a different instance or cluster.
DCM archives are stored in the DCM repository (file-based or database). For standalone J2EE and Web Cache instances, archives are stored on the local filesystem.
You can use DCM archiving separately from OracleAS Backup and Recovery. It is an easy way to save configurations before making changes to your system, or to save and restore a particular configuration for specific purposes, such as operating one configuration during the day and another at night.
In addition, you can incorporate DCM archiving into your OracleAS Backup and Recovery strategies as follows:
Backup Considerations for DCM Archives
Oracle recommends that you create a DCM archive of each middle-tier instance every time you perform a backup, and export the archives to a backup location. This provides an additional measure of safety. The steps for creating and exporting a DCM archive are included in the backup procedures in this book.
Recovery Considerations for DCM Archives
Typically, you will not require a DCM archive for restoring your environment. However, there may be situations when you cannot restore middle-tier configuration files or the repository successfully. You can then use the DCM archive to restore your DCM configurations.
See Also: Distributed Configuration Management Reference Guide for more information on DCM archiving, and Oracle Technology Network (http://otn.oracle.com ) for the latest information on DCM
|
This section provides considerations for performing backup and recovery in Oracle Application Server environments that use high availability solutions. It contains the following topics:
If you use OracleAS Cold Failover Cluster, you can use the procedures in this book to backup and recover your environment, with the following additional considerations:
Backup Considerations for OracleAS Cold Failover Cluster
Oracle recommends that you locate archive logs for the Metadata Repository on the shared disk. This ensures that, when failing over from one cluster node to another in the case of media recovery, the archive logs are also failed over and available.
You can generate archive logs to a local filesystem, however, the same path must be available during runtime on whichever node is hosting the Infrastructure instance.
Proper capacity planning is required in order to ensure adequate space is available to store the desired number of archive logs.
Recovery Considerations for OracleAS Cold Failover Cluster
There are no special considerations for recovering OracleAS Cold Failover Cluster. As mentioned in the previous backup section, if archive logs are stored on a local filesystem, in the case of media recovery, all archive logs must be made available to the application server instance performing the recovery. Recovery can be performed on either node of the cluster.
See Also: Oracle Application Server 10g High Availability Guide for more information on OracleAS Cold Failover Cluster |
If you use OracleAS Active Failover Cluster (AFC), you can use the procedures in this book to backup and recover your environment, with the following additional considerations:
Note: In the initial release of Oracle Application Server 10g (9.0.4), Active Failover Cluster is a Limited Release feature. Please check Metalink (http://metalink.oracle.com ) for the current certification status of this feature, or consult your Sales Representative, before deploying this feature in a production environment.
|
Backup Considerations for OracleAS Active Failover Cluster
In the case of AFC where the Metadata Repository is a RAC database:
When you enable automatic archiving, you must perform the step on every RAC instance.
Enabling ARCHIVELOG
mode is done at the database level. Make sure to shut down all RAC instances (the entire database), mount one instance, and then enable ARCHIVELOG
mode one that instance with the ALTER SYSTEM
command.
Ensure archive destinations are the same on all nodes.
Keep backups consistent across all AFC nodes. Perform configuration file backups and Metadata Repository backups using the OracleAS Backup and Recovery Tool on one node. Then perform backups of only the configuration files on the additional AFC nodes.
Once the configuration files and Metadata Repository have been backed up on the first AFC node, ensure no administrative changes take place until the configuration files on the additional AFC nodes have been backed up. If any administrative changes occur before you have a chance to backup the additional AFC nodes, a new backup of all AFC nodes is required.
See Also: Appendix G, "Examples of Administrative Changes" to learn more about administrative changes |
Recovery Considerations for OracleAS Active Failover Cluster
In case of media recovery, ensure the archive logs from all AFC nodes are available in the archive log destination on the node where recovery is taking place.
Complete the recovery of configuration files and the Metadata Repository on one node first. Recover only the configuration files (not the Metadata Repository) on the additional AFC nodes. In an AFC Infrastructure configuration, the Metadata Repository is shared between all nodes. Once you have recovered the Metadata Repository on one node, there is no need to recover the Metadata Repository on the additional nodes.
See Also: Oracle Application Server 10g High Availability Guide for more information on OracleAS Active Failover Cluster |
This section provides a roadmap for getting started with Oracle Application Server backup and recovery.
Learn About Database Backup and Recovery.
The Oracle Application Server environment includes the Metadata Repository—an Oracle9i database. Performing backup and recovery on Oracle Application Server includes performing backup and recovery of a database. It is, therefore, important for application server administrators to understand database backup and recovery.
If you are not experienced with database backup and recovery, Oracle recommends you read Oracle9i Backup and Recovery Concepts Release 1 (9.0.1), which is available in the Oracle9i document library.
In particular, the following topics apply to Oracle Application Server backup and recovery:
Using ARCHIVELOG
mode
Performing cold database backups
Performing online database backups
Using the RMAN backup and recovery utility
Install and Configure the OracleAS Backup and Recovery Tool.
Oracle recommends you install and configure the tool and familiarize yourself with its features. Even if you do not use the tool in the long run, it will help you get started with backup and recovery.
You must install the tool into each of your Infrastructure and middle-tier installations. This is because you will customize the tool for each installation. Chapter 12, "Oracle Application Server Backup and Recovery Tool" provides instructions.
Implement the Backup Strategy.
Chapter 13, "Backup Strategy and Procedures" outlines the Oracle-recommended backup strategy and backup procedures. Following this backup strategy ensures that you will be able to perform the recovery procedures in this book.
Recover as Necessary.
In the event of system failure or data loss, refer to Chapter 14, "Recovery Strategies and Procedures". It outlines different types of failures and describes the procedures you can follow to recover.