Oracle® Application Server 10g Administrator's Guide
10g (9.0.4) Part No. B10376-02 |
|
![]() |
![]() |
This chapter describes the Oracle Application Server backup strategy and procedures.
It contains the following topics:
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
Step 3: Perform a New Complete Oracle Application Server Environment Backup After a Major Change
Step 4: Perform Online Backups on a Regular Basis (Return to Step 2)
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.
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.
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".
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:
An operating system software upgrade
An Oracle Application Server software upgrade or patch application
To do so:
Update the record of your Oracle Application Server environment.
Refer to Section 13.2.2, "Creating a Record of Your Oracle Application Server Configuration".
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:
Create a backup of the JRE/JDK on your system. This isn't an Oracle product, but it is utilized by Oracle Application Server and, if accidentally lost or corrupted, would need to be restored in order for Oracle Application Server to function. This issue only applies to HP-UX, HP Tru64, and IBM AIX systems.
Make sure your backups are valid by routinely verifying that they can be restored.
This section describes the backup procedures in detail.
It contains the following topics:
Creating a Record of Your Oracle Application Server Configuration
Performing a Complete Oracle Application Server Environment Backup
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:
Enable automatic archiving by editing the following initialization file:
(UNIX) INFRA_ORACLE_HOME/dbs/init<SID>.ora (Windows) INFRA_ORACLE_HOME\..\admin\<SID>\pfile\init.ora
(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
(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'
(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
Make sure the ORACLE_HOME
and ORACLE_SID
(the default is asdb
)
environment variables are properly set.
Make sure nobody is using the database.
Perform a clean, normal shutdown of the database instance.
INFRA_ORACLE_HOME/bin/sqlplus /nolog SQL> connect sys/password as sysdba SQL> shutdown
Start up the instance and mount, but do not open, the database.
SQL> startup mount;
Enable database ARCHIVELOG
mode.
SQL> alter database archivelog;
Shut down and restart the database instance.
SQL> shutdown SQL> startup
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
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:
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
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
Stop the middle-tier instances.
Refer to Section 3.2.4, "Stopping a Middle-Tier Instance" for instructions.
Stop the Infrastructure.
Refer to Section 3.2.2, "Stopping an Infrastructure" for instructions.
Step 2: Back Up the Infrastructure
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 (UNIX) ./bkp_restore.pl -m backup_cold (Windows) perl 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.
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 .
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 (UNIX) ./bkp_restore.pl -m backup_config (Windows) perl bkp_restore.pl -m backup_config
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:
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 .
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 (UNIX) ./bkp_restore.pl -m backup_config (Windows) perl bkp_restore.pl -m backup_config
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.
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.
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.
Step 5: Back Up the Oracle System Files
On each host in your Oracle Application Server environment:
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.
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
Step 6: Start Your Oracle Application Server Environment
Start the Infrastructure.
Refer to Section 3.2.1, "Starting an Infrastructure" for instructions.
Start the middle-tier instances.
Refer to Section 3.2.3, "Starting a Middle-Tier Instance" for instructions.
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
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 (UNIX) ./bkp_restore.pl -m backup_config_incr (Windows) perl bkp_restore.pl -m backup_config_incr
Note: The tool may report harmless error message in some configurations. Refer to Section 12.8, "Error Messages You Can Ignore". |
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 (UNIX) ./bkp_restore.pl -m backup_online (Windows) perl bkp_restore.pl -m backup_online
Step 2: Back Up the Middle-tier Installations
For each middle-tier installation in your environment:
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 (UNIX) ./bkp_restore.pl -m backup_config_incr (Windows) perl bkp_restore.pl -m backup_config_incr
Note: The tool may report harmless error message in some configurations. Refer to Section 12.8, "Error Messages You Can Ignore". |
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.
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.