Execute rman backup regularly in windows (script + Method Introduction)

Source: Internet
Author: User
Backup is the most important. Many test environments are built on windows, and there is one on the master's computer. to ensure its security, it is decided to perform regular backup. The example shows how to use scripts + windows scheduled tasks in windows to periodically execute full backup. Backup script C: rman_backuprman_bk.bat file content: rman

Backup is the most important. Many test environments are built on windows, and there is one on the master's computer. to ensure its security, it is decided to perform regular backup. The example shows how to use scripts + windows scheduled tasks in windows to periodically execute full backup. Backup script C: \ rman_backup \ rman_bk.bat file content: rman

Backup is the most important. Many test environments are built on windows, and there is one on the master's computer. to ensure its security, it is decided to perform regular backup.

The example shows how to use scripts + windows scheduled tasks in windows to periodically execute full backup.

Backup script

C: \ rman_backup \ rman_bk.bat file content:

Rman target sys/xiaojun @ startrek prepare file 'C:/rman_backup/rman_bk_script.txt 'log' c:/rman_backup/% DATE :~ 0, 4% % DATE :~ 5, 2% % DATE :~ 8, 2% ". Log'

C: \ rman_backup \ rman_bk_script.txt file content (you can modify it as needed)

RUN {
Delete noprompt obsolete;
Allocate channel c1 type disk;
Backup database format 'C:/rman_backup/db _ % U' plus archivelog delete all input format 'C:/rman_backup/arch _ % U ';
Release channel c1;
}
Exit

Run rman_bk.bat to output:

C:\Users\fengjun>rman target sys/xiaojun@startrek cmdfile 'c:/rman_backup/rman_bk_script.txt' log 'c:/rman_backup/20140121".log'RMAN> 2> 3> 4> 5> 6> 7>C:\Users\fengjun>C:\Users\fengjun>
The following files are generated in the corresponding C: \ rman_backup directory:

Set windows scheduled task

Run the command in cmd.

Taskschd. msc

Go to the task scheduling page in windows.

Create basic task

Enter the Task Name

Select Period

Select the cycle Start Time

Select Start Program for Operation Type

Set script location

Then you can run the test directly.

If you need to reprint it, please indicate the source:

Blog.csdn.net/renfengjun or

Www. orcl. cc

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.