1. 程式人生 > >rman 全庫備份

rman 全庫備份

全庫備份指令碼,包括歸檔日誌及控制檔案、SPFILE引數檔案
[[email protected]~]$ cat fullback.sh 
#!/bin/sh
source /home/oracle/.bash_profile
rman   log /opt/uniload/oracle/backup/log/backfull-`date +%Y%m%d-%H%M`.log <<EOF
connect target /;
run {
backup full tag 'bys001-full' database
format "/opt/uniload/oracle/backup/full_back/bys001full_%d_%t_%s"
plus archivelog
format "/opt/uniload/oracle/backup/full_back/bys001arch_%d_%t_%s"
delete all input;
}
exit