In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Background description
The company tape library is broken. Where do I put the backup of oracle every day?
2. Re-plan the backup mode
Original backup mode
Current backup mode
3. Backup script sharing
Xiaobai wrote a backup shell script and shared it.
#! / bin/bash# tar oraclebackup file # check RMAN is run?# I always create a RMAN log when I make a RMAN backup, so this log can determine whether my RMAN has executed filename= "/ mnt/rman/log/RmanBackup_ `log +% m% d`.log" comparedata= "Recovery Manager complete." if [- e $filename] Then echo "`date`RMAN is run" & > > / OPS/tarlogelse echo "`date` RMAN is not run,please check" & > > / OPS/tarlog exit 1fi# check RMAN is OK?# judges whether the RMAN backup is successful by judging the final result of my log. If it is not successful, I do not need to back up data= `tail-1$ filename`if ["$data" = "$comparedata"] Then echo "`date` Rman backup sucess" & > > / OPS/tarlogelse echo "`date` Rman backup fail" & > > / OPS/tarlog exit 2fi# tar backupfile and move to backupserver# compresses the backup set of the day and move it to the folder provided by nfs. After my 300GB backup is compressed, it is only 30 GB, and the compression ratio is still amazing / usr/bin/find / mnt/rman-name 'oradb1*' > / OPS/tarlistfor I in `/ bin/cat / OPS/ tarlist`. Do echo "`date` tar $I start" & > > / OPS/tarlog tar-zcvf $i.tar.gz $I & > > / OPS/tarlog doneif [$?-eq 0]; then echo "`date` tar end success" & > > / OPS/tarlog mv / mnt/rman/*.tar.gz / oraclebackup if [$?-eq 0] Then echo "`date`move to oraclebackup fail" & > > / OPS/tarlog else echo "`date`move to oraclebackup fail" & > > / OPS/tarlog fielse echo "`date`tar fail" & > / OPS/tarlogfi
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.