0% found this document useful (0 votes)
34 views

NetBackup OracleDedupe BestPractices (Rev2)

Uploaded by

Sameer Mohanty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

NetBackup OracleDedupe BestPractices (Rev2)

Uploaded by

Sameer Mohanty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Symantec NetBackup for

Oracle Deduplication Best


Practices Guide

Revision 2
The software described in this book is furnished under a license agreement and may be used
only in accordance with the terms of the agreement.

Documentation version: 7.0.1

Legal Notice
Copyright © 2011 Symantec Corporation. All rights reserved.

Symantec and the Symantec Logo are trademarks or registered trademarks of Symantec
Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks
of their respective owners.

The product described in this document is distributed under licenses restricting its use,
copying, distribution, and decompilation/reverse engineering. No part of this document
may be reproduced in any form by any means without prior written authorization of
Symantec Corporation and its licensors, if any.

THE DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT,
ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO
BE LEGALLY INVALID. SYMANTEC CORPORATION SHALL NOT BE LIABLE FOR INCIDENTAL
OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING,
PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED
IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.

The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, "Rights in
Commercial Computer Software or Commercial Computer Software Documentation", as
applicable, and any successor regulations. Any use, modification, reproduction release,
performance, display or disclosure of the Licensed Software and Documentation by the U.S.
Government shall be solely in accordance with the terms of this Agreement.

Symantec Corporation
350 Ellis Street
Mountain View, CA 94043

http://www.symantec.com
Technical Support
Symantec Technical Support maintains support centers globally. Technical
Support’s primary role is to respond to specific queries about product features
and functionality. The Technical Support group also creates content for our online
Knowledge Base. The Technical Support group works collaboratively with the
other functional areas within Symantec to answer your questions in a timely
fashion. For example, the Technical Support group works with Product Engineering
and Symantec Security Response to provide alerting services and virus definition
updates.
Symantec’s support offerings include the following:
■ A range of support options that give you the flexibility to select the right
amount of service for any size organization
■ Telephone and/or Web-based support that provides rapid response and
up-to-the-minute information
■ Upgrade assurance that delivers software upgrades
■ Global support purchased on a regional business hours or 24 hours a day, 7
days a week basis
■ Premium service offerings that include Account Management Services
For information about Symantec’s support offerings, you can visit our Web site
at the following URL:
www.symantec.com/business/support/
All support services will be delivered in accordance with your support agreement
and the then-current enterprise technical support policy.

Contacting Technical Support


Customers with a current support agreement may access Technical Support
information at the following URL:
www.symantec.com/business/support/
Before contacting Technical Support, make sure you have satisfied the system
requirements that are listed in your product documentation. Also, you should be
at the computer on which the problem occurred, in case it is necessary to replicate
the problem.
When you contact Technical Support, please have the following information
available:
■ Product release level
■ Hardware information
■ Available memory, disk space, and NIC information
■ Operating system
■ Version and patch level
■ Network topology
■ Router, gateway, and IP address information
■ Problem description:
■ Error messages and log files
■ Troubleshooting that was performed before contacting Symantec
■ Recent software configuration changes and network changes

Licensing and registration


If your Symantec product requires registration or a license key, access our technical
support Web page at the following URL:
www.symantec.com/business/support/

Customer service
Customer service information is available at the following URL:
www.symantec.com/business/support/
Customer Service is available to assist with non-technical questions, such as the
following types of issues:
■ Questions regarding product licensing or serialization
■ Product registration updates, such as address or name changes
■ General product information (features, language availability, local dealers)
■ Latest information about product updates and upgrades
■ Information about upgrade assurance and support contracts
■ Information about the Symantec Buying Programs
■ Advice about Symantec's technical support options
■ Nontechnical presales questions
■ Issues that are related to CD-ROMs or manuals
Support agreement resources
If you want to contact Symantec regarding an existing support agreement, please
contact the support agreement administration team for your region as follows:

Asia-Pacific and Japan [email protected]

Europe, Middle-East, and Africa [email protected]

North America and Latin America [email protected]


Deduplicating Oracle
backups
This document includes the following topics:

■ About deduplicating Oracle backups

■ Prerequisites

■ Optimizing and deduplicating stream-based and proxy copy Oracle backups

■ For more information

About deduplicating Oracle backups


This topic explains how to use NetBackup to configure Oracle backups that are
optimized for deduplication. You can configure either stream-based backups or
proxy copy backups. The following topics explain how to optimize deduplicated
Oracle backups:
■ See “Prerequisites” on page 7.
■ See “Optimizing and deduplicating stream-based and proxy copy Oracle
backups” on page 8.
■ See “For more information” on page 14.

Prerequisites
The optimized deduplication that this white paper describes requires the following
software:
■ NetBackup 6.5.5 or later.
8 Deduplicating Oracle backups
Optimizing and deduplicating stream-based and proxy copy Oracle backups

■ (Conditional) One of the following emergency engineering binaries (EEBs) that


enable deduplicated, optimized, proxy copy Oracle backups:

EEBs NetBackup release level

2158524 and 2176416 NetBackup 7.0.1

2158522 NetBackup 7.0

2171243 NetBackup 6.5.6

2171228 NetBackup 6.5.5

Obtain the appropriate EEB(s) if you plan to perform proxy copy backups. You
do not need to download additional EEBs if you want to perform stream-based
backups.
Contact Symantec technical support to open a support case and to obtain a
copy of the EEB that is appropriate for your NetBackup release level. Both the
EEB and this technote are available for internal distribution only.
EEB 2176416, which is appropriate for NetBackup 7.0.1 platforms only, enables
faster deduplicated backups for large files and is recommended for Oracle
database backups.

Optimizing and deduplicating stream-based and proxy


copy Oracle backups
NetBackup enables you to perform optimized deduplication of Oracle databases.
You can perform either a stream-based backup or a proxy copy backup.
Symantec recommends that you perform a proxy copy when one or more of the
following are true:
■ The Oracle database that you want to back up is at the Oracle 10gR1 revision
level or lower.
■ The database consists of many small tablespaces.
■ The database administrator or the backup administrator does not want to set
FILESPERSET=1.

For stream-based backups, Symantec recommends that you specify FILESPERSET=1


for all Oracle database backups. When FILESPERSET=1 is specified, Oracle generates
the backup set identically each time, with the same data from the same files in
the same sequence each time the database is backed up. This uniformity ensures
better deduplication. In addition, when FILESPERSET=1 is in effect, Oracle does
not perform multiplexing, so Oracle includes only one file in each backup set. If
Deduplicating Oracle backups 9
Optimizing and deduplicating stream-based and proxy copy Oracle backups

FILESPERSET is specified with a number other than 1, Oracle groups files together
unpredictably and deduplication rates suffer.
Symantec recommends that you test your database backups by running both
stream-based backups and proxy copy backups. Measure the deduplication rates
and the backup times, and see which method fits best in your environment. The
Oracle database files themselves benefit the most from deduplication. Typically,
the archive logs and the control files are unique, so they benefit less from
deduplication.
For information about the backup methods, see the following:
■ See “Configuring a stream-based Oracle backup” on page 9.
■ See “Configuring a proxy copy Oracle backup” on page 11.

Configuring a stream-based Oracle backup


The NetBackup 7.0.1, 7.0, 6.5.6, and 6.5.5 releases contain code that enables you
to perform a stream-based, optimized, deduplicated Oracle backup. Your system
does not need any additional EEBs if you want to perform stream-based backups.
The following procedure explains how to reconfigure an existing Oracle RMAN
specification to achieve a stream-based, optimized, deduplicated Oracle backup.
To configure a stream-based Oracle backup
1 On the client computer that hosts the Oracle database, open the RMAN backup
script in a text editor, and make the following edits:
■ Add the FILESPERSET=1 parameter to the part of the RMAN script that
specifies how you want to back up the database.
Do not add FILESPERSET=1 to the section of the RMAN script that specifies
how to back up the control files or archive logs. Typically, these other
data objects are unique to each backup, so there is very little potential
gain from optimizing the control file and archive log backups for
deduplication.
Example RMAN script after editing:

BACKUP
FILESPERSET=1
%BACKUP_TYPE%
FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
DATABASE;

The addition of FILESPERSET=1 suppresses Oracle multiplexing of more


than one data file into a backup set. When you suppress Oracle
10 Deduplicating Oracle backups
Optimizing and deduplicating stream-based and proxy copy Oracle backups

multiplexing, Oracle creates the backup set identically each time the
backup runs. NetBackup can deduplicate these identical backup sets.
■ Specify parallel backup streams for the database backup.
Specify appropriate ALLOCATE CHANNEL and RELEASE CHANNEL parameters
in the backup script.
For an example that shows an edited backup script, see the following:
See “Example RMAN script for a stream-based backup” on page 14.
2 Disable Oracle's optimization and encryption for the duration of the database
backup.
By default, Oracle disables optimization and encryption. If optimization and
encryption are enabled, run the following RMAN commands from the
command line to disable optimization and encryption:

RMAN> CONFIGURE BACKUP OPTIMIZATION OFF;


RMAN> CONFIGURE ENCRYPTION FOR DATABASE OFF;

If your site requires encryption, you can specify encryption in the NetBackup
for Oracle backup policy.
3 Disable Oracle's compression for the duration of the database backup.
By default, Oracle disables compression. If compression is enabled, Oracle
compresses unused sections in streams, and the result is unpredictable
deduplication rates. If compression is enabled, run the following RMAN
command from the command line to disable compression:

RMAN> CONFIGURE DEVICE TYPE SBT_TAPE BACKUP TYPE TO BACKUPSET;

If your site requires compression, you can specify compression in the


NetBackup for Oracle backup policy.
4 Configure a NetBackup for Oracle policy.
If you want to compress or encrypt the backup, enable compression and
encryption in the NetBackup pd.conf file.
Run a full database backup as soon as you can. The policy can perform
incremental backups until the full backup can be run.

Note: Make sure that Oracle optimization, encryption, and compression are
disabled for the entirety of the database backup. Make sure to check specifications
outside of the RMAN backup script, too.
Deduplicating Oracle backups 11
Optimizing and deduplicating stream-based and proxy copy Oracle backups

Configuring a proxy copy Oracle backup


In order to perform a proxy copy Oracle database backup that is optimized and
deduplicated, you need to download and install an EEB on your system. The EEB
that Symantec has created enables optimized, deduplicated Oracle proxy copy
backups without a snapshot client. The following procedures explain how to install
the EEB on a client and how to reconfigure RMAN to perform the optimized,
deduplicated backup:
■ See “Downloading and installing the NetBackup EEB” on page 11.
■ See “Editing the RMAN script and configuring NetBackup for Oracle”
on page 12.

Downloading and installing the NetBackup EEB


The following procedure explains how to download and install the EEB onto the
client that hosts the Oracle database.
To download and install the NetBackup EEB
1 Contact the Symantec technical support group to open a support case and to
obtain a copy of the EEB that is appropriate for the level of NetBackup that
you have installed.
2 Download the EEB onto the client that hosts the Oracle database.
The EEB contains an updated library file and an updated backup archiver.
3 Stop all NetBackup services.
Type one of the following commands:
■ On Windows clients, type the following:

> install_path\Veritas\NetBackup\bin\bpdown

■ On UNIX clients, type the following:

# /usr/openv/netbackup/bin/bp.kill_all

4 Stop all Oracle instance processes and listener processes.


See your Oracle documentation for information about how to perform this
step.
12 Deduplicating Oracle backups
Optimizing and deduplicating stream-based and proxy copy Oracle backups

5 (Conditional) Flush the library cache.


Perform this step on AIX platforms.
For example:

$ slibclean

See your Oracle documentation for more information about how to perform
this step.
6 Run the EEB installer.
Use the instructions in the EEB installation package. The following Web site
contains general EEB installation instructions:
http://www.symantec.com/business/support/index?page=content&id=TECH64620
7 Restart all Oracle instance processes and listener processes.
See your Oracle documentation for information about how to perform this
step.
8 Start NetBackup services.
Type one of the following commands:
■ On Windows clients, type the following:

> install_path\Veritas\NetBackup\bin\bpup

■ On UNIX clients, type the following:

# /usr/openv/netbackup/bin/bp.start_all

9 (Conditional) Apply EEB 2176416.


Perform this step in NetBackup 7.0.1 environments.

Editing the RMAN script and configuring NetBackup for Oracle


The following procedure explains how to edit the RMAN script on the client.
To edit the RMAN script
1 On the client computer that hosts the Oracle database, open the RMAN backup
script in a text editor, and make the following edits:
■ Add PROXY to the list of commands that backs up the data files.
Example RMAN script after editing:

BACKUP
FORMAT 'bk_u%u_s%s_p%p_t%t'
Deduplicating Oracle backups 13
Optimizing and deduplicating stream-based and proxy copy Oracle backups

PROXY
DATABASE;

■ Specify the NB_ORA_PC_STREAMS parameter in the database backup script.


For an example that shows an edited backup script, see the following:
See “Example RMAN script for a proxy copy backup” on page 15.
2 Disable Oracle's optimization and encryption for the duration of the database
backup.
By default, Oracle disables optimization and encryption. If the optimization
and encryption are enabled, run the following RMAN commands from the
command line to disable optimization and encryption:

RMAN> CONFIGURE BACKUP OPTIMIZATION OFF;


RMAN> CONFIGURE ENCRYPTION FOR DATABASE OFF;

If your site requires encryption, you can specify encryption in the NetBackup
for Oracle backup policy.
3 Disable Oracle's compression for the duration of the database backup.
By default, Oracle disables compression. If compression is enabled, Oracle
compresses unused sections in streams, and the result is unpredictable
deduplication rates. If compression is enabled, run the following RMAN
command from the command line to disable compression:

RMAN> CONFIGURE DEVICE TYPE SBT_TAPE BACKUP TYPE TO BACKUPSET;

If your site requires compression, you can specify compression in the


NetBackup for Oracle backup policy.
4 Configure a NetBackup for Oracle policy.
If you want to compress or encrypt the backup, enable compression and
encryption in the NetBackup pd.conf file.
Run a full database backup as soon as you can. You can perform incremental
backups until the full backup can be run.

Note: Make sure that Oracle optimization, encryption, and compression are
disabled for the entirety of the database backup. Make sure to check
specifications outside of the RMAN backup script, too.
14 Deduplicating Oracle backups
For more information

For more information


For more information about NetBackup for Oracle, see one of the following:
■ NetBackup for Oracle Administrator's Guide for UNIX and Linux
■ NetBackup for Oracle Administrator's Guide for Windows
■ The example RMAN backup scripts that NetBackup for Oracle wrote to your
computer at the time the product was installed. Look in one of the following
directories:
■ On Windows systems:
install_path\NetBackup\dbext\Oracle\samples\rman

■ On UNIX systems:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman

■ The example scripts in the following topics:


■ See “Example RMAN script for a stream-based backup” on page 14.
■ See “Example RMAN script for a proxy copy backup” on page 15.

Example RMAN script for a stream-based backup


The following is an example fragment from an RMAN script that performs an
optimized, deduplicated, stream-based backup of an Oracle database.

RUN {

# Back up the database.


# Use 4 channels as 4 parallel backup streams.

ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';


ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch02 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch03 TYPE 'SBT_TAPE';
SEND ' NB_ORA_SERV=$NB_ORA_SERV’;

BACKUP
$BACKUP_TYPE
SKIP INACCESSIBLE
TAG hot_db_bk_level0
# The following line sets FILESPERSET to 1 and facilitates database deduplication.
FILESPERSET 1
Deduplicating Oracle backups 15
For more information

FORMAT 'bk_%s_%p_%t'
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;

# Back up the archive logs


# The FILESPERSET parameter setting depends on the number of archive logs you have.

ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';


ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
SEND ' NB_ORA_SERV=$NB_ORA_SERV’;
BACKUP
FILESPERSET 20
FORMAT 'al_%s_%p_%t'
ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
#
# Note: During the process of backing up the database, RMAN also backs up the
# control file. This version of the control file does not contain the
# information about the current backup because "nocatalog" has been specified.
# To include the information about the current backup, the control file should
# be backed up as the last step of the RMAN section. This step would not be
# necessary if we were using a recovery catalog or auto control file backups.
#
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND ' NB_ORA_SERV=$NB_ORA_SERV’;
BACKUP
FORMAT 'cntrl_%s_%p_%t'
CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}

Example RMAN script for a proxy copy backup


The following is an example of an RMAN script that performs an optimized,
deduplicated, proxy copy backup of an Oracle database.
16 Deduplicating Oracle backups
For more information

RUN {

# Back up the database.

ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';

# Specify 2 streams, one stream per channel.

SEND 'NB_ORA_PC_STREAMS=2';
BACKUP
PROXY
SKIP INACCESSIBLE
TAG hot_db_bk_proxy
FORMAT 'bk_%s_%p_%t'
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;

# Back up the archive logs.


# The FILESPERSET parameter setting depends on the number of archive logs you have.

ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';


ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
SEND ' NB_ORA_SERV=$NB_ORA_SERV’;
BACKUP
FILESPERSET 20
FORMAT 'al_%s_%p_%t'
ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;

#
# Note: During the process of backing up the database, RMAN also backs up the
# control file. This version of the control file does not contain the
# information about the current backup because "nocatalog" has been specified.
# To include the information about the current backup, the control file should
# be backed up as the last step of the RMAN section. This step would not be
# necessary if we were using a recovery catalog or auto control file backups.
#
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND ' NB_ORA_SERV=$NB_ORA_SERV’;
Deduplicating Oracle backups 17
For more information

BACKUP
FORMAT 'cntrl_%s_%p_%t'
CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
18 Deduplicating Oracle backups
For more information

You might also like