Backup is a top priority for DBAs. No matter how powerful your technology is and there is no backup, you are still helpless when something goes wrong.
Here is just the BACKUP command summarized in the work. The scripts collected in the future will be continuously updated ......
1. In the RAC environment, if the archivelog of the two nodes are stored locally, how can I perform the backup?
Enable the two channels and connect them to the two instances using the TNS connection string for backup. Thi
Label:With 0112111 incremental backup strategy, 7 days a cycle that is, Sunday level 0 backup, Week 1 2 4 5 6 with 2-level incremental backup, week 3 with 1-level incremental backupConfigure control file backup path
RMAN > CONFIGURE controlfile autobackup FORMAT for DEVICE TYPE DISK to '/u01/backup/rmanbk/ccontrolfile_%f ';
Data Backup directory
$ mkdir-p/U01/BACKUP/RMANBK
First set the number of days to expire to 7 d
The logs backed up by RMAN are put in a file. The backup script in nocatalg was sent using Linux Sendmail. However, this affects the system startup time. It is still sent using python. After the backup, call the script. Send RMAN logs to the mailbox. Check the email in the morning to check whether the backup is success
The RMAN backup script in Windows is relatively simple. Let's look at the content.
1.ModifyRMANRelated Parameters
RMAN> show all;
RMAN> Configure controlfile autobackup on;
RMAN> Configure controlfile autobackup format for device type disk to 'd:/backup/% F ';
With RMAN automatic backup script, and automatic copy of the backup file to other machines last write a batch backup script with exp, the response is good, see: http://www.cnoug.org/viewthread.php? Tid = 20864
Encouraged by this, the RMAN script for maintaining the product
I. Incremental backup scriptLevel 0 backup script: The red part is the directory of the custom backup fileCopy codeThe Code is as follows:# Script.: BackupFull. sh# Creater: xyh# Date: 2014-03-08# Desc: backup full database datafile in archive with rman# Connect databaseExport ORACLE_BASE =/u01/app/oracleExport ORACLE_SID = orclExport ORACLE_HOME =/u01/app/oracle
Oracle Rman Cold Shell script (I am here full backup, created 2 channels C1, C2) can be changed on this basis650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/86/18/wKioL1e0fHyRO_TTAABgkcV8Mm0539.png-wh_500x0-wm_3 -wmp_4-s_2228178479.png "title=" capture. PNG "alt=" Wkiol1e0fhyro_ttaabgkcv8mm0539.png-wh_50 "/>Text:#!/bin/bash#Author: Wangergui email:[email protected] date:2016-08-17#Function: Oracl
Rman backup script
#! /Bin/bash
Su-oracle
Rman target/
Backup as compressed backupset database
Include current controlfile format '/orabak/db _ % d _ % T _ % s'
Plus archivelog format'/orabak/arch _ % d _ % T _ % s' delete allinput;
Delete noprompt obsolete;
Exit;
EOF
The third backup storage platform automatically clears expired backup files
#! /Bin/bash
Tags: rman scripting shell1, the database is fully prepared to the hard disk[[Emailprotected]scripts]$catrman_backup.shsource/home/oracle/.bash_ profilermantarget/log=/home/oracle/backup/backupall_rman.log2. Incremental backup ScriptLevel 0 increments[[Emailprotected]scripts]$catrman_backup_level0.shsource/home/oracle /.bash_profilermantarget/log=/home/oracle/backup/backupall_rman.logLevel 1 increments[[Emailprotected]scripts]$catrman_backup_level1.sh
Tags: rman scripting shell1, the database is fully prepared to the hard disk[[Emailprotected]scripts]$catrman_backup.shsource/home/oracle/.bash_ profilermantarget/log=/home/oracle/backup/backupall_rman.log2. Incremental backup ScriptLevel 0 increments[[Emailprotected]scripts]$catrman_backup_level0.shsource/home/oracle /.bash_profilermantarget/log=/home/oracle/backup/backupall_rman.logLevel 1 increments[[Emailprotected]scripts]$catrman_backup_level1.sh
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.