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