Skip Headers
Oracle® Application Server Administrator's Guide
10g Release 2 (10.1.2)
Part No. B13995-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

19 Backup Strategy and Procedures

This chapter describes the Oracle Application Server backup strategy and procedures.

It contains the following topics:

19.1 Recommended Backup Strategy

This section describes the recommended backup strategy for Oracle Application Server. Using this strategy ensures that you can perform the recovery procedures described in this book.

The backup strategy is as follows:

The following flow cart provides an overview of how to decide which type of backup is appropriate for a given circumstance.

Figure 19-1 Decision Flow Chart for Type of Backup

Decision Flow Chart for Type of Backup
Description of the illustration asadm036.gif

Task 1: Perform a Complete Oracle Application Server Environment Cold Backup

The first backup you perform should be a complete Oracle Application Server environment backup, which includes all of the files in your environment. Before you perform your first backup, make sure ARCHIVELOG mode is enabled in the Metadata Repository. You should also create a record of your environment.

  1. Enable ARCHIVELOG mode in the Metadata Repository.

    By default, the Metadata Repository does not have ARCHIVELOG mode enabled. You should enable it immediately so your online redo logs are archived. You should enable ARCHIVELOG mode before you perform your first complete cold backup. Otherwise, your backup control files will contain the NOARCHIVELOG mode setting. You cannot use the Backup and Recovery Tool in the NOARCHIVELOG mode.

    Refer to Section 19.2.2, "Enabling ARCHIVELOG Mode".

  2. Perform a complete Oracle Application Server environment backup.

    This will serve as the baseline for all subsequent non-environmental backups.

    Refer to Section 19.2.4, "Performing a Complete Oracle Application Server Environment Backup".

  3. Create a record of your Oracle Application Server environment.

    In the event you need to reconstruct your environment, you can refer this record.

    Refer to Section 19.2.3, "Creating a Record of Your Oracle Application Server Configuration".

Task 2: Perform Configuration and Metadata Backups on a Regular Basis

After every administrative change, or, if this is not possible, on a regular basis, perform a configuration and metadata backup of your Oracle Application Server environment.


See Also:

Appendix G, "Examples of Administrative Changes" to learn more about administrative changes

Refer to Section 19.2.5, "Performing a Configuration and Metadata Backup".

Task 3: Perform a New Complete Oracle Application Server Environment Backup After a Major Change

If you make a major change to your Oracle Application Server environment, you must perform a new complete Oracle Application Server environment backup. This backup will serve as the basis for subsequent non-environmental backups. You should also update the record of your environment with the new configuration information.

Perform a new complete Oracle Application Server environment backup after:

To do so:

  1. Update the record of your Oracle Application Server environment.

    Refer to Section 19.2.3, "Creating a Record of Your Oracle Application Server Configuration".

  2. Perform a complete Oracle Application Server environment backup.

    Refer to Section 19.2.4, "Performing a Complete Oracle Application Server Environment Backup".

Task 4: Perform Configuration and Metadata Backups on a Regular Basis (Return to Task 2)

After you establish a new complete Oracle Application Server environment backup, return to Task 2 and continue to perform configuration and metadata backups on a regular basis.

Additional Tips:

19.2 Backup Procedures

This section describes the backup procedures in detail. There is some data interdependency between the configuration files in your Oracle Application Server Middle-tier installations, the Distributed Management Repository, the Identity Management metadata, and the Oracle Application Server Metadata Repository in the Infrastructure. In order to maintain configuration data consistency, you should take a backup of each of your Oracle Application Server instances (Middle-tier and Infrastructure) at the same time. While taking a backup of one Oracle Application Server instance, ensure that no configuration changes are made in any of the other instances.

This section contains the following topics:

19.2.1 Enabling Block Change Tracking

To increase performance on incremental database backups, enable block change tracking using the following command:

alter database enable block change tracking using file file_name;

If the db_create_file_dest parameter is set in the spfile or init.ora file of the database, the following command can be used:

alter database enable block change tracking;

Once you enable block change tracking, incremental database backup will use block change tracking.

For more information on block change tracking, refer to Backup and Recovery Basics in the Oracle Database 10g Release 1 (10.1) Documentation Library.

19.2.2 Enabling ARCHIVELOG Mode

By default, the Metadata Repository does not have ARCHIVELOG mode enabled. You must enable ARCHIVELOG mode, which enables the archiving of online redo logs. This will allow you to perform the recovery strategies in this book.


See Also:

You can find more detailed information on the parameters in this section, and setting up archive logging in general, in Oracle Database Administrator's Guide 10g Release 1 (10.1).

To enable ARCHIVELOG mode:

  1. Specify the destination directory for your archives by including the initialization parameter LOG_ARCHIVE_DEST in the initialization file. If spfile is being used, then the following command can be issued:

    alter system set log_archive_dest='xxx' scope=spfile;
    
    

    If pfile is being used, the following initialization file needs to be edited:

    For UNIX systems:

    INFRA_ORACLE_HOME/dbs/initSID.ora
    
    

    For Windows systems:

    INFRA_ORACLE_HOME\database\initSID.ora
    
    

    Change the LOG_ARCHIVE_DEST parameter to:

    LOG_ARCHIVE_DEST = /disk1/oraHome/archive'
    
    

    (Optional) The default filename format for archive logs is:

    %t_%s.dbf
    
    

    If you would like to use a different format, include the initialization parameter LOG_ARCHIVE_FORMAT in the initialization file, for example:

    LOG_ARCHIVE_FORMAT = arch%s.dbf
    
    
  2. Make sure the ORACLE_HOME and ORACLE_SID (the default is orcl) environment variables are properly set.

  3. Make sure nobody is using the database.

  4. Perform a clean, normal shutdown of the database instance.

    INFRA_ORACLE_HOME/bin/sqlplus /nolog
    SQL> connect sys/password as sysdba
    SQL> shutdown
    
    
  5. Start up the instance and mount, but do not open the database.

    SQL> startup mount;
    
    
  6. Enable database ARCHIVELOG mode.

    SQL> alter database archivelog;
    
    
  7. Shut down and restart the database instance.

    SQL> shutdown
    SQL> startup
    
    
  8. Verify the database is now in ARCHIVELOG mode.

    Execute the following command and verify that Database log mode is Archive Mode and Automatic archival is Enabled.

    SQL> archive log list;
    Database log mode             Archive Mode
    Automatic archival            Enabled
    Archive destination           /disk1/oraHome/archive
    Oldest on-line log sequence   997
    Next log sequence to archive  999
    Current log sequence          999
    

19.2.3 Creating a Record of Your Oracle Application Server Configuration

In the event you need to restore and recover your Oracle Application Server environment, it is important to have all the necessary information at your disposal. This is especially true in the event of a hardware loss that requires you to reconstruct all or part of your Oracle Application Server environment on a new disk or host.

You should maintain an up-to-date record of your Oracle Application Server environment that includes the information listed in this section. You should keep this information both in hardcopy and electronic form. The electronic form should be stored on a host or e-mail system that is completely separate from your Oracle Application Server environment.

Your Oracle Application Server hardware and software configuration record should include:

  • The following information for each host in your environment:

    • Hostname

    • Virtual hostname (if any)

    • Domain name

    • IP address

    • Hardware platform

    • Operating system release level and patch information

  • The following information for each Oracle Application Server installation in your environment:

    • Installation type (For example: Infrastructure or J2EE and Web Cache)

    • Host on which the installation resides

    • User name, userid number, group name, groupid number, environment profile, and type of shell for the operating system user that owns the Oracle home (/etc/passwd and /etc/group entries)

    • Directory structure, mount points, and full path for ORACLE_HOME

    • Amount of disk space used by the installation

    • Port numbers used by the installation


      Note:

      ORACLE_HOME/install/portlist.ini contains the port numbers assigned during installation. However, this file is not updated if you change port numbers after installation, so you need to keep track of those changes manually.

  • The following information for the Metadata Repository:

    • Database version and patch level

    • Base language

    • Character set

    • Global database name

    • SID

19.2.4 Performing a Complete Oracle Application Server Environment Backup

This section describes how to perform a complete Oracle Application Server environment backup. A complete Oracle Application Server environment backup includes Identity Management metadata and Oracle Application Server Metadata Repository, which can be stored in the same database or different databases. There are two modes for backing up the database(s): cold backup and online backup. Before performing a cold backup on an open database, the Backup and Recovery Tool performs a clean shutdown and rolls back any ongoing changes to the database. As a result, a cold backup is a copy of the database at a consistent state. A consistent backup can be restored without recovery. An online backup does not require shutting down the repository database. There is no need to bring down your business applications, providing a higher degree of continuous availability. An online backup is a snapshot or point-in-time image of the database. When you use the Backup and Recovery Tool to restore an online backup, any ongoing changes to the database occurring during the time of the online backup will be recovered by applying the redo logs. Refer to the Oracle Database Backup and Recovery Advanced User's Guide, Section 2, "RMAN Backup Types" for more detail.

It contains the following steps:

Task 1: Shut Down Your Oracle Application Server Environment

If this is the first backup after installing the Oracle Application Server, you should take the following steps to shut down the Oracle Application Server Environment and perform a cold backup of the database(s) where the Identity Management metadata and the Oracle Application Server Metadata Repository are stored. If you are performing a complete Oracle Application Server environment backup after a major change, like a rolling- software upgrade, you can perform either a cold backup or an online backup of the database(s). If you choose the online backup so that your business applications remain up and running, you can skip this task and proceed with Task 2 and Task 3.

  1. Stop the middle-tier instances.

    Refer to Section 3.2.4, "Stopping a Middle-Tier Instance" for instructions.

  2. Stop the Infrastructure.

    Refer to Section 3.2.2, "Stopping OracleAS Infrastructure" for instructions.

Task 2: Back Up the Middle-tier Installations

For each middle-tier installation in your environment:

  1. Back up the middle-tier Oracle home.

    Perform a complete backup of all files in the middle-tier Oracle home using your preferred operating system command, such as tar or cpio.

    Be sure to perform this backup as root because some of the files in the Oracle home are owned by root. It is important to perform the backup so that file owners, groups, permissions, and timestamps are preserved.

    For example:

    cd MID_TIER_ORACLE_HOME
    tar cvf full_path_of_backup_file
    Backup the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
    
    
  2. Back up the middle-tier configuration files.

    If the DCM repository type is a database, the following processes must be up:

    • The OPMN process must be up. The command "opmnctl start" can be used to bring it up.

    • The Oracle Internet Directory process must to be up. The command "opmnctl startproc ias-component=OID" can be used to start this process. The Oracle Internet Directory process exists on Infrastructure (IM + MR) or IM installation.

    • The database needs to be up and running.

    • The listener process must be up.

    Perform a backup of all configuration files in the middle-tier Oracle home. You can perform this step using your own procedure or the OracleAS Backup and Recovery Tool. For example, to do this using the tool:

    • For UNIX systems:

      bkp_restore.sh -m backup_config
      
      
    • For Windows systems:

      bkp_restore.bat -m backup_config
      

    The reason for doing a configuration file backup immediately after backing up the entire Oracle home is that it provides a snapshot of your initial configuration files, in case you start to reconfigure your system and then would like to restore the configuration files to their original state.

    The configuration files are stored in jar files located in the directory specified by the config_backup_path parameter in the config.inp file. Two jar files are created, one for DCM-managed components and one for all the other components. The jar files are kept in sync by the timestamp incorporated in each jar file name. For example:

    config_bkp_2004-05-10_18-33-15.jar
    dcm_archive_2004-05-10_18-33-15.jar
    

Task 3: Back Up the Infrastructure

  1. Perform a cold database backup of the Metadata Repository.

    You can perform this step using your own procedure or the OracleAS Backup and Recovery Tool. For example, to do this using the tool:

    • For UNIX systems:

      bkp_restore.sh -m backup_cold
      or
      bkp_restore.sh -m backup_online
      
      
    • For Windows systems:

      bkp_restore.bat -m backup_cold
      or
      bkp_restore.bat -m backup_online
      
      

    Note that the tool leaves the database running when finished. Shut down the database before continuing with the rest of these steps.

  2. Back up the Infrastructure Oracle home.


    Note:

    If your Infrastructure is split and has Identity Management in one Oracle home, and the Metadata Repository in another Oracle home, perform this step on both Oracle homes. If your Identity Management is split between Oracle Internet Directory in one Oracle home and Single Sign-On, Delegated Administration Service, and so on in another Oracle home, you also should perform this step on each of those Oracle homes.

    Perform a complete backup of all files in the Infrastructure Oracle home using your preferred operating system command, such as tar or cpio.

    Be sure to perform this backup as root because some of the files in the Oracle home are owned by root. It is important to perform the backup so that file owners, groups, permissions, and timestamps are preserved.

    For example:

    cd INFRA_ORACLE_HOME
    tar cvf full_path_of_backup_file
    Backup the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE 
    
    
  3. Back up the Infrastructure configuration files.


    Note:

    If your Infrastructure is split and has Identity Management in one Oracle home, and the Metadata Repository in another Oracle home, perform this step on both Oracle homes. If your Identity Management is split between Oracle Internet Directory in one Oracle home and Single Sign-On, Delegated Administration Service, and so on in another Oracle home, you also should perform this step on each of those Oracle homes.

    If the DCM repository type is a database, the following processes must be up:

    • The OPMN process must be up. The command "opmnctl start" can be used to bring it up.

    • The Oracle Internet Directory process must to be up. The command "opmnctl startproc ias-component=OID" can be used to start this process. The Oracle Internet Directory process exists on Infrastructure (IM + MR) or IM installation.

    • The database needs to be up and running.

    • The listener process must be up.

    Perform a backup of all configuration files in the Infrastructure Oracle home. You can perform this step using your own procedure or the OracleAS Backup and Recovery Tool. For example, to do this using the tool:

    • For UNIX systems:

      bkp_restore.sh -m backup_config
      
      
    • For Windows systems:

      bkp_restore.bat -m backup_config
      

    The reason for doing a configuration file backup immediately after backing up the entire Oracle home is that it provides a snapshot of your initial configuration files. You can use this if you start to reconfigure your system and then would like to restore the configuration files to their original state.

Task 4: Back Up the Oracle System Files

On each host in your Oracle Application Server environment:

  1. Make a backup of your Oracle system files using your preferred operating system command, such as tar or cpio.

    Consult your operating system-specific documentation to determine which directory contains your Oracle system files. For example, on UNIX systems, they may be in the /var/opt/oracle or /etc directory.

  2. If the oraInventory directory resides outside of your Oracle Application Server Oracle home, make a backup of it using your preferred operating system command, such as tar or cpio.

    If you are not sure of the location of your oraInventory directory, you can find it in the oraInst.loc file. For example, on UNIX systems, look in /var/opt/oracle/oraInst.loc or /etc/oraInst.loc. On Windows systems, the location of the oraInventory can be obtained from the registry: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\INST_LOC

Task 5: Start Your Oracle Application Server Environment

  1. Start the Infrastructure.

    Refer to Section 3.2.1, "Starting OracleAS Infrastructure" for instructions.

  2. Start the middle-tier instances.

    Refer to Section 3.2.3, "Starting a Middle-Tier Instance" for instructions.

19.2.5 Performing a Configuration and Metadata Backup

Once you have performed a complete Oracle Application Server environment backup, you should perform subsequent configuration and metadata backups after every administrative change, or, if this is not possible, on a regular basis.


See Also:

Appendix G, "Examples of Administrative Changes" to learn more about administrative changes

These backups can be performed online (while Oracle Application Server is up and running), and only contain configuration files, Identity Management metadata and the Metadata Repository.

This section describes how to perform a configuration and metadata backup of your Oracle Application Server environment. It contains the following steps:

Task 1: Back Up the Infrastructure

  1. Perform a full or incremental backup of the configuration files.

    You can perform this step using your own procedure or the OracleAS Backup and Recovery Tool. For example, to do this using the tool:

    • On UNIX systems:

    bkp_restore.sh -m backup_config
    or
    bkp_restore.sh -m backup_config_incr
    
    
    • On Windows systems:

    bkp_restore.bat -m backup_config
    or
    bkp_restore.bat -m backup_config_incr
    
  2. Perform an online database backup of the Metadata Repository. It can be a full or incremental online backup.

    You can perform this step using your own procedure or the OracleAS Backup and Recovery Tool. For example, to do this using the tool:

    • On UNIX systems:

    bkp_restore.sh -m backup_online
    or
    bkp_restore.sh -m backup_online_incr -l 2
    
    
    • On Windows systems:

    bkp_restore.bat -m backup_online
    or
    bkp_restore.bat -m backup_online_incr -l 2
    

Task 2: Back Up the Middle-tier Installations

For each middle-tier installation in your environment, perform a full or incremental backup of configuration files. You can perform this step using your own procedure or the OracleAS Backup and Recovery Tool. For example, to do this using the tool: