Backup strategy for customer deployment, replacing important information related to customers
Database backup Scenario Deployment process:
Considering that the system is a high-availability system (7x24), it uses Rman to warm up the DB, and the specific backup steps are deployed as follows:
1. Change DB to archive mode, with 2-node archive logs in their respective/orabak/archlog directories
2. Put the DB backup files in the respective/orabak/dbbak directory of 2 nodes, each backup of the file will be distributed on 2 nodes, the purpose of this for 2 nodes can save a bit of space, because the/orabak is currently suspended under ROOTVG, Because there's no room in the datavg.
3. Backup scripts are stored in the/orabak/script of Node 1.
A The specific OS level backup script is/orabak/script/dbbak.sh, which reads as follows:
environment variable setting, the simplest way is to put the Oracle user's environment variable file. All right, all right.
PATH=/USR/BIN:/ETC:/USR/SBIN:/USR/UCB: $HOME/bin:/usr/bin/x11:/sbin:.
Export PATH
If [-S "$MAIL"] # this are at Shell startup. In normal
Then echo "$MAILMSG" # operation, the Shell checks
Fi # periodically.
Oracle_base=/opt/oracle
Oracle_home=/opt/oracle/product/11.1/db_1
Crs_home=/opt/oracle/product/11.1/crs
display=198.14.2.56:0.0
Oracle_sid=racdb1
Ld_library_path= $ORACLE _home/lib: $ORACLE _home/rdbms/lib:/lib:/usr/lib
Classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/network/jlib: $ORACLE _home/rdbms/jlib
Shlib_path= $ORACLE _home/bin: $ORACLE _home/lib32: $ORACLE _home/rdbms/lib32
Path= $PATH: $ORACLE _home/bin: $CRS _home/bin:/usr/sbin:/usr/local/bin:/usr/lib/builtins:
ora_nls33= $ORACLE _home/ocommon/nls/admin/data
Export oracle_base oracle_home oracle_sid DISPLAY ld_library_path CLASSPATH shlib_path PATH ora_nls33
Nls_lang=american_america.zhs16gbk
Export Nls_lang
--Backup scripts
Rman target/cmdfile= '/orabak/script/dbbak.sql ' log= '/orabak/script/dbbak.log ' append <<eof
B The OS level backup script/orabak/script/dbbak.sh calls the DB level script/orabak/script/dbbak.sql content as follows:
run{
Allocate channel C1 device type disk connect sys/system@racdb1;
Allocate channel C2 device type disk connect sys/system@racdb2;
Backup as compressed backupset database format= '/orabak/dbbak/racdb_%t_%u.bak ';
Delete NoPrompt obsolete;
Crosscheck backup;
Crosscheck Archivelog All;
Delete noprompt expired backup;
Delete noprompt expired archivelog all;
Backup as compressed backupset archivelog all format= '/orabak/dbbak/archlog_%t_%u.bak ';
}
Exit
Eof
4. Every night 11:30 the system automatically backs up the DB, the implementation script is as follows:
$ crontab-l
* * * */orabak/script/dbbak.sh
5. By the space limit of the ROOTVG of the/orabak directory, we have established a 3-day backup policy, DB Backup and archive, and archive log backup is retained 3 days after the automatic deletion, the specific backup strategy is as follows:
$ Rman Target/
Recovery manager:release 11.1.0.6.0-production on Wed June 9 16:24:41 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to target DATABASE:RACDB (dbid=3428846088)
Rman> Show All;
Using target database control file instead of recovery catalog
RMAN configuration parameters for database with Db_unique_name racdb are:
CONFIGURE RETENTION POLICY to RECOVERY windows of 3 days;
6. Through the test, found that the backup can be successful, no problems currently found, the specific test when the backup log is as follows:
Recovery manager:release 11.1.0.6.0-production on Wed June 9 15:01:00 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to target DATABASE:RACDB (dbid=3428846088)
Rman> run{
2> Allocate channel C1 device type disk Connect *
3> Allocate channel C2 device type disk connect *
This article URL address: http://www.bianceng.cn/database/Oracle/201410/45560.htm