Automatic RMAN backup in RHEL5

Source: Internet
Author: User
The automatic backup script of RMAN under RHEL5 is written on the server for scheduled execution: (1) Full backup of the database, backup of control files and archive log files at the same time.

The automatic backup script of RMAN under RHEL5 is written on the server for scheduled execution: (1) Full backup of the database, backup of control files and archive log files at the same time.

In RHEL5, the automatic backup script of RMAN is written and regularly executed on the server:

Requirements

(1) The database is fully standby, and control files and archive log files are backed up at the same time. After archiving log files are backed up, archived logs are automatically deleted.

(2) The backup is retained for 14 days and automatically deleted upon expiration.

(3) Retain rman operation logs

Compile the RMAN batch file:

#! /Bin/bash
Run {
Configure retention policy to redundancy 14;
Configure controlfile autobackup on;
Configure controlfile autobackup format for device type disk

'/U01/scripts/controlfile _ % F ';
Allocate channel c1 device type disk format'/u01/scripts/db_bak _ % U ';
Backup database skip inaccessible
Plus archivelog filesperset 20
Delete all input;
Release channel c1;
}
Allocate channel for maintenance device type disk;
Crosscheck backupset;
Delete noprompt obsolete;

Write commands to execute batch processing:


#! /Bin/bash
Oracle_HOME =/u01/app/oracle/10.2.0/db_1
ORACLE_BASE =/u01/app/oracle
ORACLE_SID = orcl
$ ORACLE_HOME/bin/rman target/partition file = '/u01/scripts/orcl_bak.rman'

Recommended reading:

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.