Oracle full-database backup script

Source: Internet
Author: User

Connect target backup username/password @ kfdb2;
Connect rcvcat RMAN/RMAN @ RMAN;

Run {
Allocate channel ch00 type 'sbt _ tape ';
Allocate channel ch01 type 'sbt _ tape ';
Allocate channel ch02 type 'sbt _ tape ';
Allocate channel ch03 type 'sbt _ tape ';
Send 'nsr _ Env = (ns_server = jcyz01, ns_client = nmkfdb2, ns_data_volume_pool = nmkfdb, ns_compression = true, volumes = "2 weeks", volumes = "2 weeks ", ns_group = nmkf_oracle_full )';

Backup
Incremental level 0
Filesperset 4
Format 'dbfull _ % S _ % P _ % t'
Database;
SQL 'alter system archive log current ';

Release Channel ch00;
Release Channel ch01;
Release Channel ch02;
Release Channel ch03;

Allocate channel ch00 type 'sbt _ tape ';
Send 'nsr _ Env = (ns_server = jcyz01, ns_client = nmkfdb2, ns_data_volume_pool = nmkfdb, ns_compression = true, volumes = "2 weeks", volumes = "2 weeks ", ns_group = nmkf_oracle_full )';

Backup
Format 'cntrl _ % S _ % P _ % t'
Current controlfile;

Release Channel ch00;

Allocate channel ch00 type 'sbt _ tape 'connect' backup username/password @ kfdb1 ';
Allocate channel ch01 type 'sbt _ tape 'connect' backup username/password @ kfdb ';

Send 'nsr _ Env = (ns_server = jcyz01, ns_data_volume_pool = nmkfdb1, ns_compression = true, ns_saveset_browse = "2 weeks", ns_saveset_retention =
"2 weeks", ns_group = nmkf_oracle_arch )';

Backup
Filesperset 8
Format 'al _ % S _ % P _ % t'
Archivelog all Delete input;

Release Channel ch00;
Release Channel ch01;

Allocate channel D1 type disk;

Copy current controlfile to '/APP/NSR/rman_bak/kfdb_ctl_full.bak ';

Release channel D1;

Host '/APP/networker/bin/Save-s jcyz01-B nmkfdb-W 2 weeks-Y 2 weeks/APP/NSR/rman_bak/kfdb_ctl_full.bak ';

}

For reprint, please indicate the source and original article links:

Http://blog.csdn.net/xiangsir/article/details/8570480

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.