ITPub博客

首页 > Linux操作系统 > Linux操作系统 > rman脚本

rman脚本

原创 Linux操作系统 作者:bontonpan 时间:2009-01-30 13:56:09 0 删除 编辑
::::::::::::::
backup_0_sun.rms
::::::::::::::
run{
allocate channel c1 type disk maxpiecesize=8G;
allocate channel c2 type disk maxpiecesize=8G;
allocate channel c3 type disk maxpiecesize=8G;
allocate channel c4 type disk maxpiecesize=8G;
BACKUP INCREMENTAL level 0 database filesperset=10;
BACKUP archivelog all delete all input;
delete obsolete;
}
::::::::::::::
backup_1_sun.rms
::::::::::::::
run
{
allocate channel c1 type disk maxpiecesize=8G;
allocate channel c2 type disk maxpiecesize=8G;
allocate channel c3 type disk maxpiecesize=8G;
allocate channel c4 type disk maxpiecesize=8G;
BACKUP INCREMENTAL level 1 database filesperset=10;
BACKUP archivelog all delete all input;
delete obsolete;
}

::::::::::::::
backup_0_sun.sh
::::::::::::::
PATH=$PATH:$HOME/bin
ORACLE_BASE=/usr/local/oracle
ORACLE_SID=mrp
LD_LIBRARY_PATH=$ORACLE_HOME/lib
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME
export ORACLE_BASE
export ORACLE_SID
export LD_LIBRARY_PATH
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH
unset USERNAME
$ORACLE_HOME/bin/rman target / @/home/oracle/backup_0_sun.rms log=/home/oracle/`date +%y-%m-%d`_full.log


::::::::::::::
backup_1_sun.sh
::::::::::::::
PATH=$PATH:$HOME/bin
ORACLE_BASE=/usr/local/oracle
ORACLE_SID=mrp
LD_LIBRARY_PATH=$ORACLE_HOME/lib
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME
export ORACLE_BASE
export ORACLE_SID
export LD_LIBRARY_PATH
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH
unset USERNAME
$ORACLE_HOME/bin/rman target / @/home/oracle/backup_1_sun.rms log=/home/oracle/`date +%y-%m-%d`_inr.log


*******************************************************************
RMAN> show all
2> ;

using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/hd06/rman/backup/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   '/mnt/hd06/rman/backup/%F';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/hd06/oracle/product/10.2.0/db_1/dbs/snapcf_mrp.f';


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11754813/viewspace-544795/,如需转载,请注明出处,否则将追究法律责任。

上一篇: crontab 用法
请登录后发表评论 登录
全部评论

注册时间:2009-01-30

  • 博文量
    51
  • 访问量
    37212