Oracle® Mail Administrator's Guide 10g Release 1 (10.1.2) Part Number B25499-04 |
|
|
View PDF |
This chapter describes how to back up and recover Oracle Mail.
This chapter includes the following topics:
Disaster planning is a critically important aspect of administering an e-mail system. System files and the Oracle Collaboration Suite Database itself must be backed up regularly using the standard Oracle Database tools in order to be able to recover all or part of the e-mail system and data if a disaster occurs.
In addition to the standard database backup and recovery tools, the following processes and tools allow you to back up and recover data on a more granular level:
The oesbkp
utility backs up and recovers folders, messages, address book entries, and server-side rules for individual users
LogMiner-based mail recovery recovers deleted messages using database redo logs
Flashback query-based mail recovery recovers messages using Oracle Flashback Query
Oracle Mail uses Oracle Database 10g as its information storage database, so standard database backup and recovery methods can be used to maintain copies of the most current contents of the e-mail system. It is important to perform a full system backup at regularly scheduled times so that the entire Oracle Mail system can be restored to that snapshot if needed. Partial backups of the system can be performed between full backups so that the system can be recovered to a more recent point in time.
Oracle Collaboration Suite Database backup methods include:
Export backup, which is appropriate for small Oracle Mail systems
Hot backup, which provides online backup and restore operations without shutting down the system
Cold backup, which requires shutting down the system
Note: Individual user accounts cannot be restored from database backups. To back up and restore individual user accounts, use theoesbkp utility, described in "Backing Up and Restoring User Data with oesbkp". |
See Also:
|
Individual e-mail users are categorized into two states:
Active: Can access their mailboxes
Inactive: Cannot access their mailboxes
Individual e-mail user accounts can be backed up and restored using the oesbkp
command-line utility. oesbkp
restores backed-up items at different levels of granularity. For example, you can restore either an entire user account or a single folder, which is particularly useful for backing up and restoring critical information.
Note: The backup and restore functionality cannot be applied to inactive users.To back up inactive users, make them temporarily active, perform the backup, and return the users to their inactive status. |
oesbkp
backs up the following user data into flat files:
Folders
Messages
Private address book entries
Server-side rules
When restoring user accounts:
All messages in the account are restored in a new folder to avoid overwriting existing messages
Private address entries are restored in the user's private address book, but entries that already exist are not restored
A user's restored server-side rules overwrite existing server-side rules
Using oesbkp
The oesbkp
syntax is as follows:
oesbkp task={backup | restore} user=userid@domain password=admin_password [type={all | mail | rules | addrbook}] [admindn=database_account_with_admin_ privileges] [ldaphost=host_name] [ldapport=port_number] [backupdir=directory] [folder=folder_name]
Table 10-1 lists oesbkp
parameters and definitions.
Table 10-1 oesbkp Parameters
Parameter Name | Valid Values | Default Value | Description |
---|---|---|---|
task |
|
None |
Indicates whether this is a backup or restore request |
user |
Fully qualified user name |
None |
Fully qualified name, including the domain, of the user being backed up or restored. For example a valid value is |
password |
Any string |
None |
Password for the distinguished name (DN) |
type |
|
|
Indicates the objects to be backed up or restored: all (folders, messages, server-side rules, and address book entries); messages only; server-side rules only; or address book entries only. |
admindn |
Any valid DN for the LDAP server |
|
DN that the tool uses to bind to the LDAP server. The DN should have admin privileges, such as |
ldaphost |
Any host name |
|
Name of the host where Oracle Internet Directory is installed |
ldapport |
Any integer |
|
Port on which Oracle Internet Directory is listening |
backupdir |
Any valid directory |
|
Location where the backup is being created or restored from |
folder |
Any folder name |
None |
Name of the folder to be backed up or restored. If no value is specified, then all available folders are backed up or restored. |
Note: When maintaining multiple backups for a particular user, ensure that each backup is named uniquely to avoid overwriting files. |
Note the following information regarding oesbkp
parameters:
Parameter and value pairs must be specified with a blank space separating them on the oesbkp
command line. Parameters can appear in any order.
The following parameters are mandatory:
task
user
password
Logging information for oesbkp
is stored in:
$ORACLE_HOME/oes/log/um_system/backup/number/text.log
The number
variable is generated by the system and does not represent a process ID or other such number.
oesbkp
creates the following backup files:
The user
_rules.xml
file contains the specified user's server-side rules.
The user
_addrbook.ldif
file contains the specified user's address book entries.
The user
_foldermap
file contains mapping between the specified user's files and folders, which enables the backup of folders that have names containing characters that are not supported by the operating system.
The user_n
(user
_1
, user
_2
, and so forth) file represents each of the user's folders.
Folders are restored in subfolders in the following user account folder:
restore_dd-Mon-yyyy hh24:mi/subfolder_name
The subfolder_name
variable has the same name as the original folder being restored, and dd-Mon-yyyy hh24:mi
shows when the restore operation occurred (not when the backup operation occurred).
If a user is over quota when the backup is performed, the over-quota messages are also backed up. If a user's folder is being restored and the messages in the folder cause the user to go over quota, the restore operation does not occur. Check the oesbkp
log files to view the user's current quota and usage, and if necessary, increase the user's quota before restoring messages.
The following example shows how to create a full backup of all folders, messages, and private address book entries for john@acme.com
in the /bkp/allbkps
directory:
oesbkp task=backup type = all user=john@acme.com admindn=cn=orcladmin password=abcd ldaphost=ldap.acme.com ldapport=4032 backupdir=/bkp/allbkps
The folders created in the /bkp/allbkps
directory are:
john@acme.com_rules.xml john@acme.com_addrbook.ldif john@acme.com_foldermap john@acme.com_1 john@acme.com_2
The following example shows how to restore the messages to the inbox of john@acme.com
from the backup stored in the /bkp/allbkps
directory:
oesbkp task=restore type=mail user=john@acme.com password=abcd backupdir=/bkp/allbkps folder=inbox
In this example, if the restore operation is performed at 2:00 a.m. on January 17, 2006, the messages are restored to John's account in a new folder named inbox
, which is a subfolder of restore_17-Jan-2006 02:00
.
Database redo logs record all changes made to data. If a failure prevents modified data from being permanently written to the data files, the changes can be obtained from the redo logs using the Oracle Database 10g LogMiner feature. With LogMiner, you can use SQL to read, analyze, and interpret log files.
Whenever an Oracle Mail message is deleted, the change in data is recorded in a database redo log. With LogMiner, you can retrieve deleted messages from the redo logs.
To fully translate the contents of redo logs, LogMiner requires access to a database dictionary. Without the database dictionary, LogMiner returns internal object identifiers and presents data in hexadecimal form. A LogMiner dictionary file contains information that identifies the database from which it was created and the time it was created. The data dictionary must be extracted prior to using LogMiner to recover Oracle Mail messages.
If you want to use LogMiner recovery, any and every Housekeeper process instance must have the Support Log Miner Recovery parameter enabled.
See Also: "Process Control Message Cleanup" for information about setting up LogMiner to recover messages |
See Also: The following documents for information about LogMiner:
|
This section contains the following topics:
Oracle Mail users and administrators can recover messages deleted as of a certain time using the Oracle Flashback Query feature. The flashback query-based e-mail recovery applies to e-mail messages transferred to another folder. Oracle Flashback Query creates a snapshot of the database at a certain point in time, from which an Oracle Mail user can recover all messages that are in a particular folder at a specific point in time.
Oracle Flashback Query uses the retention control functionality provided by the Automatic Undo Management feature of the Oracle Collaboration Suite Database. The database maintains information that is used to roll back, or undo, changes to the database. Undo information consists of records of the actions of transactions, primarily before they are committed. Retention control enables you to specify the minimum period of time for which database undo information is saved before the space is overwritten by newer transactions.
When an Oracle Mail message is deleted, a record is created in the database undo logs. When Oracle Flashback Query retrieves the deleted message, the message is restored from the undo logs. The longer the undo information is retained, the older the deleted messages Oracle Mail users can retrieve using Oracle Flashback Query. A message can be recovered only if retention control is enabled and the message was deleted within the specified retention period.
The length of time for which database undo information is retained depends upon the amount of available disk space, the amount of e-mail traffic going through the Oracle Mail system, and the user activity on the system. The longer the undo information is retained or the heavier the activity on the e-mail system, the more disk space is required. An Oracle Mail system that receives a large number of messages each day requires more disk space to retain undo information than a system that receives just a few messages each day.
See Also: Oracle Database Administrator's Guide for information about managing undo spaces, choosing the retention period for flashback queries, and calculating undo retention space requirements |
Deleted messages can be retrieved with Oracle Flashback Query using the Microsoft Outlook client connecting to Oracle Mail through Oracle Connector for Outlook. Recovered messages are recovered to the folder of the user's choice. Flashback recovery by Oracle Mail through the Oracle Connector for Outlook can be enabled or disabled using the Oracle WebMail client administration pages.
See Also: Oracle Connector for Outlook Online Help for more information about recovering messages using Microsoft Outlook through the Outlook Connector |
Administrators can also use the PL/SQL package MAIL_RECOVERY_FQ
to recover messages for a user using Oracle Flashback Query.
Recovered messages are included in quota calculations. If a user's quota is exceeded during flashback recovery, no additional messages are recovered.
A message can be recovered even if it exists in a different folder. For example, if a message was moved from a user's Inbox to FolderA and the user decided to recover the moved message into RecoverInbox, a pointer to the message would be created in RecoverInbox.
If a user tries to recover a message that already exists in the destination folder, the message retrieval fails. For example, if the message already exists in RecoverInbox and the user tries to recover that message into RecoverInbox, the recovery is not performed.
To set up Oracle Flashback Query:
Ensure that the Oracle Collaboration Suite Database is using an undo
tablespace. By default, an undo
tablespace is created during the installation of Oracle Collaboration Suite 10g.
Set the retention time:
ALTER SYSTEM SET UNDO_RETENTION=time_in_seconds
For example, to retain undo information for at least 3 hours, set the UNDO_RETENTION
parameter as follows:
ALTER SYSTEM SET UNDO_RETENTION=10800
Note: TheUNDO_RETENTION parameter can be set in the initialization parameter file. |
Optional: To enable e-mail users to use the Oracle Flashback Query feature to recover deleted messages through the Microsoft Outlook client (this requires e-mail users to use Oracle Connector for Outlook):
Open the Oracle WebMail client.
See Also: "Oracle Collaboration Suite 10g WebMail Client" for information about how to access the Oracle WebMail client |
Click the Administration tab. The Domain subtab displays by default.
Click Domain Settings.
Select an installation from the Installation list.
Select a domain from the Domain list.
Click Submit.
Select enable
from the Flashback Mail Recovery list.
Click Submit to apply the changes.
Open the Application Server Control Console for Collaboration Suite.
See Also: "Oracle Enterprise Manager 10g Application Server Control Console for Collaboration Suite" for information about accessing the Application Server Control Console for Collaboration Suite |
Click the application server instance where Oracle Mail is installed.
Click Mail Application in the System Components section to display the Mail Application page.
Select the IMAP Server process and click Restart.
The MAIL_RECOVERY_FQ
package retrieves deleted messages from one or all of a user's folders as of a specified point in time. The syntax is as follows:
mail_recovery_fq.get_recover_messages( p_usernameVARCHAR2, p_domainnameVARCHAR2, p_int_in_minsNUMBER, p_quotaNUMBER, p_fromfolderVARCHAR2, p_checksubfldrsNUMBER, p_tofolderVARCHAR2)
Table 10-2 lists parameters and descriptions for the get_recover_messages
procedure.
Table 10-2 get_recover_messages Parameters
Parameter | Description |
---|---|
p_username |
User ID of the account from which to recover e-mail |
p_domainname |
Domain name of the user |
p_int_in_min |
Time, in minutes, to go back in the past to search for deleted e-mail |
p_quota |
If the value is If the value is |
p_fromfolder |
If a value is specified, then only If the value is null, then all of the user's folders are checked for deleted e-mail messages |
p_checksubfldrs |
If the value is If the value is |
p_tofolder |
Destination of the retrieved messages. If the specified folder does not exist, the folder is created by the specified name for the deleted e-mail messages. If a folder is not specified, the system creates a folder named |
To use the mail_recovery_fq
package to recover messages:
Run SQL*Plus.
Connect to the database as es_mail
.
Execute the mail_recovery_fq.get_recover_messages
procedure.
For example, run the following procedure to recover all deleted messages in the last 30 minutes for a specified user into a newly created folder, named recovbox
, without performing any quota check.
mail_recovery_fq.get_recover_messages('e-mailID_of_user_without_domain', 'e-mail_domain_of_user', 30, 0, NULL, 0, recovbox);