码迷,mamicode.com
首页 > 其他好文 > 详细

rman备份例子

时间:2019-01-09 20:24:52      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:device   eof   locate   archive   rman   bsp   bak   output   mat   

1.全备份例子

#!/bin/sh

RMAN_OUTPUT_LOG=/home/oracle/rman_output.log
RMAN_ERROR_LOG=/home/oracle/rman_error.log
rman target / log=/home/oracle/rman_output.log<<EOF
run
{
allocate channel ch1 device type disk;
backup full database format ‘/home/oracle/rman_bakckup/db_fullbackup_%d_%s_%p_%T‘;
backup current controlfile format ‘/home/oracle/rman_bakckup/ctl_%d_%s_%p_%T‘;
backup archivelog all format ‘/home/oracle/rman_bakckup/arch_%d_%s_%p_%T‘;
release channel ch1;
}
EOF

 

#!/bin/sh

RMAN_OUTPUT_LOG=/home/oracle/rman_output.log
RMAN_ERROR_LOG=/home/oracle/rman_error.log
rman target / << EOF 1>>$RMAN_OUTPUT_LOG 2>>$RMAN_ERROR_LOG
run
{
allocate channel ch1 device type disk;
backup full database format ‘/home/oracle/rman_bakckup/db_fullbackup_%d_%s_%p_%T‘;
backup current controlfile format ‘/home/oracle/rman_bakckup/ctl_%d_%s_%p_%T‘;
backup archivelog all format ‘/home/oracle/rman_bakckup/arch_%d_%s_%p_%T‘;
release channel ch1;
}
EOF

rman备份例子

标签:device   eof   locate   archive   rman   bsp   bak   output   mat   

原文地址:https://www.cnblogs.com/hxlasky/p/10246394.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!