数据库
首页 > 数据库> > Oracle备份前一天的归档

Oracle备份前一天的归档

作者:互联网

---备份归档
[oracle@db1 ~]$ cat /home/oracle/rmarch.sh
#! /bin/bash
source /home/oracle/.bash_profile
exec >> /home/oracle/delarch`date +%y%m%d%H`.log
$ORACLE_HOME/bin/rman target / <<EOF
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck copy;
run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup as compressed backupset archivelog until time 'sysdate-1' format '/u01/0331backup/arch_%d_%T_%s_%p' delete input;
release channel c1;
release channel c2;
release channel c3;
}
delete noprompt force archivelog until time 'sysdate-1';
exit;
EOF

标签:备份,oracle,archivelog,归档,Oracle,home,_%,disk,channel
来源: https://www.cnblogs.com/ss-33/p/12604703.html