Oracle 12c Rman Backup Documentation

Source: Internet
Author: User

Create a backup directory to view the remaining space

[Email protected] ~]$DF-hDF: '/home/oratest/. Gvfs ': Permission deniedfilesystem Size used Avail use%mounted on/dev/mapper/centos-root 450G 27G 423G6% /Devtmpfs5.8G0  5.8G0% /Devtmpfs5.8G2.9G3.0G -%/dev/Shmtmpfs5.8G 34M5.8G1% /Runtmpfs5.8G0  5.8G0%/sys/fs/Cgroup/DEV/SDA1 497M 128M 370M -%/boot

Create the directory, and change the permissions for the database user

sudo mkdir-p /rman_backup/bak_data  /rman_backup/scripts 
[email protected] ~]$ sudo chgrp-r dba/rman_backup/
[email protected] ~]$ sudo chown-r oracle/rman_backup/

Rman parameter Configuration

7 days;

Fully prepared script backupfull.sh

# script.: Backupfull.SH# creater:wangshengzhuang#Date: ./ on/ to# desc:backup full database datafileincharchive with rman# connect Databaseexport oracle_base=/home/oratest/app/Oratestexport Oracle_home=/home/oratest/app/oratest/product/12.1.0/Dbhome_1export Oracle_sid=Cistestexport PATH= $ORACLE _home/bin: $PATHrman Target/<<eofrun{Allocate channel C1 type disk; Backup incremental level0Tag'db0'Format'/rman_backup/bak_data/db0_%d_%t_%s'database include current Controlfile plus archivelog filesperset -Format'/rman_backup/bak_data/arc0_%d_%t_%s'  ;       Delete noprompt obsolete; Release channel C1;} eof#

Incremental backup backupincr1.sh

# script.: Backupfull.SH# creater:wangshengzhuang#Date: ./ on/ to# desc:backup Incremental database datafileincharchive with rman# connect Databaseexport oracle_base=/home/oratest/app/Oratestexport Oracle_home=/home/oratest/app/oratest/product/12.1.0/Dbhome_1export Oracle_sid=Cistestexport PATH= $ORACLE _home/bin: $PATHrman Target/<<eofrun{Allocate channel C1 type disk; Backup incremental level1Tag'DB1'Format'/rman_backup/bak_data/db1_%d_%t_%s'database include current Controlfile plus archivelog filesperset -Format'/rman_backup/bak_data/arc1_%d_%t_%s'  ;       Delete noprompt obsolete; Release channel C1;} eof#

Configure scheduled scheduling

Sunday and Wednesday 1:00 perform a level 0 full-Library backup, 周一、二, 46 or five or six 1:00 perform a 1-level incremental backup

[Email protected] scripts]$ crontab-e0 1* *0/rman_backup/scripts/backupfull.SH>>/rman_backup/BackupFull.log0 1* *3/rman_backup/scripts/backupfull.SH>>/rman_backup/BackupFull.log0 1* *1-2/RMAN_BACKUP/SCRIPTS/BACKUPINCR1.SH>>/rman_backup/BackupIncr.log0 1* *4-6/RMAN_BACKUP/SCRIPTS/BACKUPINCR1.SH>>/rman_backup/backupincr.log

Reload scheduling

sudo /sbin//bin/systemctl Reload  crond.service

Oracle 12c Rman Backup Documentation

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.