配置NFS
https://www.linuxprobe.com/basic-learning-12.html
ORACLE各节点挂载nfs
mount -t nfs4 -o minorversion=1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 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数据库备份异常
标签:format,备份,xxx,NBU,nfs,Oracle,_%,disk,backup From: https://www.cnblogs.com/muzisanshi/p/17027437.html