Click on this icon to load and view all the screenshots for this tutorial.
(Caution: Because this action loads all screenshots simultaneously, response
time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor
over each individual icon in the following steps to load and view only the screenshot
associated with that step.
Overview
It is important to remember that the installations in an Oracle
Collaboration Suite 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 Collaboration
Suite 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 lost files in your middle-tier installation, you could restore
it to Mondays state. However, your Infrastructure would be in its current
stateout 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 Mondays middle-tier installation. You would not be able to
restore your environment to a consistent state.
Instead, you should back up your entire Oracle Collaboration
Suite environment at once. Then, if a loss occurs, you can restore your entire
environment to a consistent state.
Roadmap for Backup and Recovery
Implement a backup and recovery for Oracle Collaboration Suite
by performing the following steps:
Learn about database backup and recovery,
because the Oracle Collaboration Suite Database and the Oracle Internet
Directory are Oracle databases.
Learn about operating system or your third-party
tool backup and recovery, so that you can back up the files on the operating
system.
Learn about OCS components backup and recovery:
Oracle Calendar uses its own data store and has its own backup and recovery
utilities.
To prevent loss of application data, place
all Collaboration Suite databases in ARCHIVELOG
mode.
Test the strategy: Ensure that both backup and recovery procedures work.
Implement the backup strategy: Following
a standard backup strategy ensures that you will be able to plan for recovery
operations and avoids confusion and delay in recovery after a failure. Perform
recovery as necessary.
The backup that you perform in this tutorial is based
on a single host installation. You will perform backups of the Oracle Collaboration
Suite Infrastructure and the Oracle Collaboration Suite Applications. These
backups will be used to restore a previous state of either the infrastructure
or the middle tier.
There are a number of different ways of implementing
your backup procedures. A complete Oracle Collaboration Suite environment backup
is a complete backup of every file type on every host in the suite. This is
typically performed just after an Oracle Collaboration Suite installation or
some major administration change (i.e.., a new patch, OS change, topological
change, etc.).
A complete backup (hot or cold) is a full backup of every
Oracle file type on a particular node. You can perform a complete backup while
the system is up (hot) or down (cold). As an alternative to a complete Oracle
backup, if your host is dedicated to Oracle, you can perform a complete system
backup. Although this backup uses more space, it has the advantage of restore
the entire host to a previous state. During recovery, this simplifies the process
of restoring the host.
The example shown in this module performs a complete Oracle Collaboration Suite
environment backup. The first backup you perform should be a complete Oracle
Collaboration Suite environment backup, which includes all of the files in your
environment (each step is covered in detail later in the module). Before you
back up for the first time, perform the following steps:
1.
Create a record of your environment. In the
event you need to reconstruct your environment, you can refer to this record.
2.
Perform a complete cold backup of your Oracle
Collaboration Suite environment.
3.
Place all Oracle databases into ARCHIVELOG
mode and configure them for complete recovery.
4.
Back up the middle-tier installations (Oracle
Collaboration Suite Applications).
5.
Back up the Oracle Collaboration Suite Infrastructure
installations.
You should maintain an up-to-date record of your Oracle Collaboration
Suite environment in hard copy and in electronic form. You need this information
in the event you must restore and recover your Oracle Collaboration Suite environment
on a new disk or host. The electronic form should be stored on a host or e-mail
system that is completely separate from your Oracle Collaboration Suite environment.
Your Oracle Collaboration Suite hardware and software configuration record should
include:
1.
For each host in your environment. The host name,
virtual host name (if any), domain name, IP address, hardware platform,
and operating system release level and patch information. Also, list the
/etc/hosts file.
2.
For each Oracle Collaboration Suite installation in your environment.
The installation type (for example: Infrastructure, Information Store,
or Middle Tier), host on which the installation resides, user name, user
ID number, group name, group ID 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, and port numbers used by the installation.
3.
For each database. Include database information (for example,
the database version, patch level, base language, character set, global
database name, and SID).
Perform a complete operating system level
Oracle Collaboration Suite environment backup
An initial cold backup includes everything to restore your
initial installation of your Oracle Collaboration Suite environment, therefore
you need:
Back up all Applications tier ORACLE_HOMEs.
Back up all Oracle Collaboration Suite Infrastructure
ORACLE_HOMEs.
Back up any additional Oracle Collaboration
Suite Database ORACLE_HOMEs.
Back up the Oracle Calendar Server and its
associated files.
Back up all Oracle Collaboration Suite Databases.
Back up Oracle system files on each host
in the environment.
This example uses a single host installation, where one machine
hosts Oracle Collaboration Suite Infrastructure and Oracle Collaboration Suite
Applications. To perform a complete cold backup of your Oracle Collaboration
Suite environment, follow these steps:
1.
Shutdown Oracle Collaboration Suite Applications. This
includes stopping of all running Oracle Collaboration Suite middle-tier
applications, the Oracle Collaboration Suite Control console, and the
Oracle Mail listener (listener_es).
(For detailed instructions see the Shutting down Oracle Collaboration
Suite lesson).
2.
Shutdown Oracle Collaboration Suite Infrastructure.
This includes stopping of all running Oracle Collaboration Suite Infrastructure
applications, the Oracle Collaboration Suite Control console, and the
Oracle Collaboration Suite Database listener (listener).
(For detailed instructions see the Shutting down Oracle Collaboration
Suite lesson).
3.
Login as root
user.
su
4.
Perform a complete operating
system level backup of the Oracle Collaboration Suite environment. (This
example stores the backup file under /u02/backup.
cd /u02/backup
tar -cvf fullbck.tar /u01/app/oracle/*
5.
Back up the Oracle system files. Store the backup file
in /u02/backup.
cd /u02/backup tar -cvf sys.tar /etc/ora* /usr/local/bin/*env /usr/local/bin/dbhome
Enable ARCHIVELOG
mode for the Oracle Collaboration Suite Database
To enable ARCHIVELOG
mode for an Oracle Database, perform the following steps:
1.
Login as the user who installed the Oracle Collaboration
Suite Database (this example assumes that the user is named oracle).
2.
Set the ORACLE_HOME
and ORACLE_SID environment
variables (this example is using the Oracle Collaboration Suite Database).
It is a good practice to write a script that contains these variables.
Enabling the flashback database
feature for the Oracle Collaboration Suite Database
By default, the Oracle Collaboration Suite Database does not
have flashback database enabled. Oracle Flashback Database allows you to quickly
recover an Oracle database to the state it was in at a previous time, to correct
problems caused by logical data corruption or user errors. If you want to use
the flashback_repos command
option with Oracle Collaboration Suite Recovery Manager the database needs to
be flashback enabled. The requirements for enabling Flashback Database are:
Your database must be running in ARCHIVELOG
mode, because archived logs are used in the Flashback Database operation.
You must have a flash recovery area (db_recovery_file_dest)
enabled, because flashback logs can only be stored in the flash recovery
area.
The database must be mounted.
To enable this feature you need to perform the following steps:
1.
Set the ORACLE_HOME
and ORACLE_SID environment
variables (this example is using the Oracle Collaboration Suite Database).
It is a good practice to write a script that contains these variables.
more infra_env
. infra_env
2.
Start SQL*Plus.
sqlplus " / as sysdba"
3.
Verify that the database is running
in ARCHIVELOG mode.
archive log list
4.
Run the following query to check if the flashback_recovery_area
is set up:
show parameters db_recovery
If the flash_recovery_area
is setup, then the destination specified by the db_recovery_file_dest
parameter is used as the archivelog destination.
5.
Check that the database is only mounted.
select open_mode from v$database;
6.
Specify the destination directory for your archives by including the
initialization parameter LOG_ARCHIVE_DEST_n
in the initialization file. Set the log_archive_dest_1
parameter. The flash_recovery_area
directory can be found under your $ORACLE_HOME
location. Check that the location exists before entering the command.
alter system set
log_archive_dest_1="LOCATION=/u01/app/oracle/flash_recovery_area/ORCL/archivelog"
scope=spfile
7.
Turn on flashback database with the following SQL command:
alter database flashback on;
8.
If you would like to use a different format, include
the initialization parameter LOG_ARCHIVE_FORMAT
in the initialization file, for example:
alter system set log_archive_format='arch_%t_%s_%r.arc' scope=spfile;
To increase performance on incremental database backups, enable
block change tracking by performing the following steps:
1.
Set the ORACLE_HOME
and ORACLE_SID environment
variables (this example is using the Oracle Collaboration Suite Database).
It is a good practice to write a script that contains these variables.
more infra_env
. infra_env
2.
Start SQL*Plus.
sqlpus " / as sysdba"
3.
Run the following query to check if the db_create_file_dest
parameter is set:
show parameters db_create_file
4.
Use the following command to enable block change tracking.
Use Oracle Collaboration Suite Recovery
Manager to back up your Oracle Collaboration Suite environment
In this topic you learn to back up your Oracle Collaboration Suite
environment using Oracle Collaboration Suite Recovery Manager. This includes the
following tasks:
To back up Oracle Collaboration Suite Applications, perform
the following steps:
1.
Startup Oracle Collaboration Suite Infrastructure.
Set the Infrastructure environment variables.
Note: The Oracle Collaboration Suite Database
has already been started as the last step in the previous topic.
more infra_env
. infra_env
2.
Start the Oracle Collaboration Suite Database
listener.
lsnrctl start
3.
Start the Oracle Collaboration Suite Infrastructure
processes.
$ORACLE_HOME/opmn/bin/opmnctl startall
4.
Verify that all mandatory Oracle Collaboration Suite
processes have the Alive
status.
$ORACLE_HOME/opmn/bin/opmnctl status
5.
Start the Oracle Mail listener (listener_es)
so that notifications from Oracle Collaboration Suite Recovery Manager
can be sent. Set the Oracle Collaboration Suite Applications environment
variables.
more apps_env
. apps_env
6.
Start the Oracle Mail listener (listener_es)
as root user. Log out
as root user when you
are done.
su id oracle tnslsnr listener_es -user <oracle user id> -group <oracle primary group id> & exit
7.
Create directories to hold the backup and log files.
To back up Oracle Collaboration Suite Infrastructure, perform
the following steps:
1.
Start the Oracle Mail listener (listener_es)
if not already done so that notifications from Oracle Collaboration
Suite Recovery Manager can be sent. Set the Oracle Collaboration Suite
Applications environment variables.
more apps_env
. apps_env
2.
Start the Oracle Mail listener (listener_es)
as root user. Log out
as root user when you
are done.
su id oracle tnslsnr listener_es -user <oracle user id> -group <oracle primary group id> & exit
3.
Start at least the SMTP processes to send and receive e-mail notifications
(This example uses a single-box installation).
Execute the ocs_bkp_restore.shscript to configure the Oracle Collaboration Suite Recovery Manager
to back up Oracle Collaboration Suite Infrastructure.
cd $ORACLE_HOME/backup_restore
./ocs_bkp_restore.sh -m configure
This script requires the following input:.
Configure the backup environment file (yes/no) : yes >
Confirm that you want to configure the backup environment
file.Click [Enter].
Enter ORACLE_HOME : /u01/app/oracle/product/10.1.2/ocs_1/infra>
Confirm the ORACLE_HOME
path. Click [Enter].
Enter the config backup path :
Enter the path to your backup directory, where you
want to store the configuration files (this example uses
/u02/backup/infra/config).
Enter the database backup path :
Enter the path to your backup directory, where you
want to store the database files (this example uses /u02/backup/infra/db).
Enter the log path :
Enter the path to your backup directory, where you
want to store the log files (this example uses /u02/backup/infra/logs).
Enter the ORACLE_SID : orcl >
Confirm the ORACLE_SID
setting. Click [Enter].
Enable Email notification (yes/no): yes >
Confirm that you want Email notification. Click [Enter]
or type No, if you do not want Email notification.
Enter the SMTP host : >
Provide the name of the SMTP host. Enter the host
name (this example uses a single-box installation).
Enter the SMTP port : 25 >
Confirm the SMTP port. Click [Enter].
Enter the from address : > <user ID>@<fully-qualified host name>
Enter the to addresses(comma seperated) : > <user ID>@<fully-qualified host name>
Enter the Email address from where you want to send
notifications regarding backup and recovery and who should receive these
notifications.
Note: You need to perform this step only once
and not for each backup that you will take.
7.
Back up the Infrastructure instance using the backup_instance_cold
mode. Press the [Enter] key when prompted by the question: Do
you wish to continue?