Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. NetBackup™ for Oracle Administrator's Guide
  3. Appendix A. Deduplication best practices
  4. Example RMAN script for a stream-based backup
NetBackup™ for Oracle Administrator's Guide

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
    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;
}

Feedback

Was this page helpful?
Previous

Configuring a stream-based Oracle backup

Next

Editing the RMAN script and configuring NetBackup for Oracle for a proxy copy backup

Feedback

Was this page helpful?