Basic Oracle RMAN applications

Source: Internet
Author: User

RMAN backup can only be performed in Oracle archive mode.
Check whether the database is in archive Mode
Archive log list
 
Change the database archive Mode
Shutdown immediate
Startup mount
Alter database archivelog;
Alter database open;
 
View the RMAN backup Environment
Rman target/
Show all;
 
Enable automatic backup of Control Files
Configure controlfile autobackup on;
Show controlfile autobackup;
 
Full database backup
Backup database;
 
View backup information
List backup;
List backup summary;
 
Write backup script
Zero-level full-database backup script
Vi BackupFull. sh
# Date 2014/4/6
Export ORACLE_SID = orcl
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1
Export PATH = $ PATH: $ ORACLE_HOME/bin:
Rman target/<EOF_RMAN
Run {
Allocate channel c1 type disk;
Backup incremental level 0 tag 'db0' format 'u01/app/oracle/Backup/db0 _ % d _ % T _ % s' database
Include current controlfile;
Delete nopromp obsolete;
Release channel c1;
}
# End
 

Level 1 Incremental Backup
Vi Incr1.sh
# Date 2014/4/6
Export ORACLE_SID = orcl
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1
Export PATH = $ PATH: $ ORACLE_HOME/bin:
Rman target/<EOF_RMAN
Run {
Allocate channel c1 type disk;
Backup incremental level 1 tag 'db1' format 'u01/app/oracle/Backup/db0 _ % d _ % T _ % s' database
Include current controlfile;
Delete nopromp obsolete;
Release channel c1;
}
# End
 
Chmod 755 BackupFull. sh
Chmod 755 Incr1.sh
 
Automatic Backup Script Execution
Crontab-e
 
0 1 ** 0/u01/app/oracle/Backup/BackupFull. sh
>/U01/app/oracle/Backup/BackupFull. log
0 1 ** 3/u01/app/oracle/Backup/BackupFull. sh
>/U01/app/oracle/Backup/BackupFull. log
30 1 ** 1-2/u01/app/oracle/Backup/Incr1.sh
>/U01/app/oracle/Backup/Incr1.log
30 1 ** 4-6/u01/app/oracle/Backup/Incr1.sh
>/U01/app/oracle/Backup/Incr1.log
 
Ps: perform full-database backup at on Sunday and Wednesday, and perform Incremental backup at level 1 at on the remaining days.
View crontab
Crontab-l

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

Related Article

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.