Skip Headers

Oracle Application Server 10g Administrator's Guide
10g (9.0.4)

Part Number B10376-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

13
Backup Strategy and Procedures

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

It contains the following topics:

13.1 Backup Strategy

This section describes the 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:

Step 1: Perform a Complete Oracle Application Server Environment 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.

    Refer to Section 13.2.1, "Enabling ARCHIVELOG Mode".

  2. Perform a complete Oracle Application Server environment backup.

    This will serve as the baseline for all subsequent online backups.

    Refer to Section 13.2.3, "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 13.2.2, "Creating a Record of Your Oracle Application Server Configuration".

Step 2: 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.

See Also:

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

Refer to Section 13.2.4, "Performing an Online Backup".

Step 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 online 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 13.2.2, "Creating a Record of Your Oracle Application Server Configuration".

  2. Perform a complete Oracle Application Server environment backup.

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

Step 4: Perform Online Backups on a Regular Basis (Return to Step 2)

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.

Additional Tips:

13.2 Backup Procedures

This section describes the backup procedures in detail.

It contains the following topics:

13.2.1 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 Oracle9i Database Administrator's Guide Release 1 (9.0.1).


To enable ARCHIVELOG mode:

  1. Enable automatic archiving by editing the following initialization file:

    INFRA_ORACLE_HOME/dbs/init<SID>.ora
    
    
    1. (Mandatory) Enable automatic archiving each time an instance is started by including the initialization parameter LOG_ARCHIVE_START in the initialization file and set it to TRUE:

      LOG_ARCHIVE_START = TRUE
      
      
    2. (Mandatory) Specify the destination directory for your archives by including the initialization parameter LOG_ARCHIVE_DEST in the initialization file, for example:

      LOG_ARCHIVE_DEST = 'LOCATION = /disk1/oraHome/archive'
      
      
    3. (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 asdb) 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	19
    Next log sequence to archive	21
    Current log sequence	21
    

13.2.2 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 email system that is completely separate from your Oracle Application Server environment.

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

13.2.3 Performing a Complete Oracle Application Server Environment Backup

This section describes how to perform a complete Oracle Application Server environment backup. It contains the following steps:

Step 1: Shut Down Your Oracle Application Server Environment
  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 an Infrastructure" for instructions.

Step 2: 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:

    cd INFRA_BACKUP_TOOL_DIRECTORY
    ./bkp_restore.pl -m backup_cold
    
    

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

    See Also:

    Chapter 12, "Oracle Application Server Backup and Recovery Tool" for more information

  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.


    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 .
    
    
  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.


    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:

    cd INFRA_BACKUP_TOOL_DIRECTORY
    ./bkp_restore.pl -m backup_config
    

    See Also:

    Chapter 12, "Oracle Application Server Backup and Recovery Tool" for more information.


    Note:

    The tool may report harmless error messages in some configurations. Refer to Section 12.8, "Error Messages You Can Ignore".


    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.

Step 3: 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 .
    
    
  2. Back up the middle-tier configuration files.

    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:

    cd MID_TIER_BACKUP_TOOL_DIRECTORY
    ./bkp_restore.pl -m backup_config
    

    See Also:

    Chapter 12, "Oracle Application Server Backup and Recovery Tool" for more information.


    Note:

    The tool may report harmless error message in some configurations. Refer to Section 12.8, "Error Messages You Can Ignore".


    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.

  3. Create a DCM archive.

    Create a DCM archive of the middle-tier instance:

    ORACLE_HOME/dcm/bin/dcmctl createArchive -archive archive_name
    
    

    Export the archive from the DCM repository to a backup location:

    ORACLE_HOME/dcm/bin/dcmctl exportArchive -archive archive_name -f 
    file_name.jar
    
    

    Make sure no configuration changes take place between the configuration file backup in step 2 and DCM archive in this step.

    See Also:

    Section 11.6.2, "Considerations for DCM Archives"

Step 4: Back Up the DCM File-based Repository (If Required)

Perform this step only if you are using a DCM file-based repository.

If you have a DCM file-based repository, it exists in one of your middle-tier installations, known as the repository host instance. You should back up (export) the DCM file-based repository by running this command in the Oracle home of the repository host instance:

ORACLE_HOME/dcm/bin/dcmctl exportRepository -file file_name

Oracle recommends you copy the repository backup file to a different host, or some other backup media. You will need this file to recover in the event of a lost host.

See Also:

Section 11.6.1, "Considerations for DCM File-based Repositories"

Step 5: 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.

Step 6: Start Your Oracle Application Server Environment
  1. Start the Infrastructure.

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

  2. Start the middle-tier instances.

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

13.2.4 Performing an Online Backup

Once you have performed a complete Oracle Application Server environment backup, you should perform subsequent online 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 and the Metadata Repository.

This section describes how to perform an online backup of your Oracle Application Server environment. It contains the following steps:

Step 1: Back Up the Infrastructure
  1. Perform an 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:

    cd INFRA_BACKUP_TOOL_DIRECTORY
    ./bkp_restore.pl -m backup_config_incr
    

    See Also:

    Chapter 12, "Oracle Application Server Backup and Recovery Tool" for more information


    Note:

    The tool may report harmless error message in some configurations. Refer to Section 12.8, "Error Messages You Can Ignore".


  2. Perform an online 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:

    cd INFRA_BACKUP_TOOL_DIRECTORY
    ./bkp_restore.pl -m backup_online
    

    See Also:

    Chapter 12, "Oracle Application Server Backup and Recovery Tool" for more information

Step 2: Back Up the Middle-tier Installations

For each middle-tier installation in your environment:

  1. Perform an 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:

    cd MID_TIER_BACKUP_TOOL_DIRECTORY
    ./bkp_restore.pl -m backup_config_incr
    

    See Also:

    Chapter 12, "Oracle Application Server Backup and Recovery Tool" for more information


    Note:

    The tool may report harmless error message in some configurations. Refer to Section 12.8, "Error Messages You Can Ignore".


  2. Create a DCM archive.

    Create a DCM archive of the middle-tier instance:

    ORACLE_HOME/dcm/bin/dcmctl createArchive -archive archive_name
    
    

    Export the archive from the DCM repository to a backup location:

    ORACLE_HOME/dcm/bin/dcmctl exportArchive -archive archive_name -f 
    file_name.jar
    
    

    Make sure no configuration changes take place between the configuration file backup in the previous step and DCM archive in this step.

    See Also:

    Section 11.6.2, "Considerations for DCM Archives"

Step 3: Back Up the DCM File-based Repository (If Required)

Perform this step only if you are using a DCM file-based repository.

If you have a DCM file-based repository, it exists in one of your middle-tier installations, known as the repository host instance. You should back up (export) the DCM file-based repository by running this command in the Oracle home of the repository host instance:

ORACLE_HOME/dcm/bin/dcmctl exportRepository -file file_name

Oracle recommends you copy the repository backup file to a different host, or some other backup media. You will need this file to recover in the event of a lost host.

See Also:

Section 11.6.1, "Considerations for DCM File-based Repositories"


Go to previous page Go to next page
Oracle
Copyright © 2002, 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index