Oracle nfs集中备份替代NBU
配置NFS
https://www.linuxprobe.com/basic-learning-12.html
ORACLE各节点挂载nfs
mount -t nfs 10.24.12.35:/ /backup
crontab定时执行全库备份及归档备份
全库备份(一天执行一次):
su - oracle -c "rman target / nocatalog log /tmp/rman_full.log append<<EOF
CONFIGURE RETENTION POLICY TO REDUNDANCY 7;
run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup as compressed backupset database
format '/backup/xxx/full_%d_%T_%s_%p'
plus archivelog
format '/backup/xxx/arch_%d_%T_%s_%p';
backup current controlfile format '/backup/xxx/ctl_%d_%T_%s_%p';
backup spfile format '/backup/xxx/spfile_%d_%T_%s_%p';
crosscheck backup;
crosscheck archivelog all;
delete noprompt archivelog until time 'sysdate-3' device type disk;
delete noprompt obsolete device type disk;
}
EOF"
归档(1小时备份一次):
#!/bin/bash
su - oracle -c "rman target / nocatalog log /tmp/rman_arch.log append << EOF
backup as compressed backupset archivelog all format '/backup/xxx/arch_%d_%T_%s_%p';
EOF"
数据库管理平台备份信息:
数据库管理平台备份管理
钉钉实现备份失败告警:
告警信息:
dbinfo:10.186.110.34:1521/xxx--ORACLE数据库备份异常
钉钉提醒恢复状态。