#date
rq=` date +"%y%m%d" `
#rm 7 data backupfile
find /osssqmbak/scap -type f -mtime +7 -exec rm {} \;
find /osssqmbak/sqmrelease -type f -mtime +7 -exec rm {} \;
find /osssqmbak/metabi -type f -mtime +7 -exec rm {} \;
find /osssqmbak/metaetl -type f -mtime +7 -exec rm {} \;
find /osssqmbak/metadsh -type f -mtime +7 -exec rm {} \;
#exp oracle backupfile
su - oracle -c "exp buffer=10240000 owner=scap file=/osssqmbak/scap/scap_$rq.dmp log=/osssqmbak/scap/scap_$rq.log"
su - oracle -c "exp buffer=10240000 owner=sqmrelease file=/osssqmbak/sqmrelease/sqmrelease_$rq.dmp log=/osssqmbak/sqmrelease/sqmrelease_$rq.log"
su - oracle -c "exp buffer=10240000 owner=metabi file=/osssqmbak/metabi/metabi_$rq.dmp log=/osssqmbak/metabi/metabi_$rq.log"
su - oracle -c "exp buffer=10240000 owner=metaetl file=/osssqmbak/metaetl/metaetl_$rq.dmp log=/osssqmbak/metaetl/metaetl_$rq.log"
su - oracle -c "exp buffer=10240000 owner=metadsh file=/osssqmbak/metadsh/metadsh_$rq.dmp log=/osssqmbak/metadsh/metadsh_$rq.log"
阅读(1334) | 评论(0) | 转发(0) |