- 论坛徽章:
- 0
|
nbu for oracle rac的序列号太贵,不买用下面方法备份,再归档到磁带
调用rman将数据库全备份到本机
$ cat backupfull.sh
#!/bin/ksh
#set env
export ORACLE_HOME=/oracle/new/product/9.2.0
export ORACLE_SID=fas2
export PATH=$PATH ORACLE_HOME/bin
echo "-----------------------------start-----------------------------";date
#backup start
$ORACLE_HOME/bin/rman catalog rman/rman@rman<<EOF
connect target /
run
{
allocate channel c1 device type disk maxpiecesize=1000m;
allocate channel c2 device type disk maxpiecesize=1000m;
backup database format '/oraarch/FULL_%T_%d_%U.bak' filesperset 2;
release channel c1;
release channel c2;
}
exit;
EOF
echo "------------------------------end------------------------------";date
定时执行脚本
szfasdb1#[/]crontab -l
# Entry(s) in /opt/hpservices/RemoteSupport are for HP Instant Support Enterprise Edition
0 0 * * 1 /opt/hpservices/RemoteSupport/config/pruneIncidents.sh
0 23 * * * su - oracle -c /home/oracle/backupfull.sh >>/home/oracle/backupfull.log
0 12 * * * /oraarch/archive.sh
调用bparchive 归档本机文档
$ cat archive.sh
> /oraarch/archivelist
ls /oraarch/*.bak > /oraarch/archivelist
ls /oraarch/arch/*.arc >> /oraarch/archivelist
/usr/openv/netbackup/bin/bparchive -p szfas -t 0 -f /oraarch/archivelist -S sz-oabackupnew -s szfas1_archive -L /oraarch/archivelog
大家还有什么好办法 |
|