[20171031]rman備份壓縮模式.txt
[20171031]rman備份壓縮模式.txt
--//測試rman備份壓縮模式,那種效果好,我記憶裡選擇medium在備份時間和備份檔案大小綜合考慮最佳.
--//還是透過指令碼測試:
1.環境:
SCOTT@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.測試指令碼.
--//test_comp.sh
#! /bin/bash
T1=$(date +%s)
rman target / << EOF
CONFIGURE COMPRESSION ALGORITHM '$1';
backup as compressed backupset database format '/home/oracle/backup/$1_%U';
EOF
T2=$(date +%s)
DELTA=$(( $T2 – $T1 ))
echo "RMAN Backup Duration Time:" $DELTA
--//test_nocomp.sh
#! /bin/bash
T1=$(date +%s)
rman target / << EOF
backup as backupset database format '/home/oracle/backup/$1_%U';
EOF
T2=$(date +%s)
DELTA=$(( $T2 - $T1 ))
echo "RMAN Backup Duration Time:" $DELTA
--//注:這個測試沒有做.
3.執行過程略.
RMAN> show COMPRESSION ALGORITHM ;
RMAN configuration parameters for database with db_unique_name BOOK are:
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
--//這個是預設設定.
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
--//執行的引數如下:BASIC LOW MEDIUM HIGH
./test_comp.sh BASIC -> RMAN Backup Duration Time: 48
./test_comp.sh LOW -> RMAN Backup Duration Time: 10
./test_comp.sh MEDIUM -> RMAN Backup Duration Time: 28
./test_comp.sh HIGH -> RMAN Backup Duration Time: 149
$ ls -l /home/oracle/backup/*_1_1 */
-rw-r----- 1 oracle oinstall 339460096 2017-10-31 16:12:54 /home/oracle/backup/BASIC_gpsidear_1_1
-rw-r----- 1 oracle oinstall 278052864 2017-10-31 16:19:15 /home/oracle/backup/HIGH_gvsidejp_1_1
-rw-r----- 1 oracle oinstall 438411264 2017-10-31 16:15:17 /home/oracle/backup/LOW_grsidegf_1_1
-rw-r----- 1 oracle oinstall 361406464 2017-10-31 16:16:16 /home/oracle/backup/MEDIUM_gtsidehu_1_1
--//畫一個表格:
壓縮模式 執行時間 備份大小
BASIC 48 339460096
LOW 10 438411264
MEDIUM 28 361406464
HIGH 149 278052864
--//其中細節自己體會吧.另外注意實際上也跟資料庫的儲存的內容來決定的,比如你儲存大量jpg圖片,這些圖片已經壓縮,
--//我估計basic最佳.
--//連結dbspecialists.com/rman-compression-algorithms-in-11gr2/
As of version 11.2.0.2, there are 4 compression algorithms available: BASIC, LOW, MEDIUM and HIGH. The 11g Backup &
Recovery Guide describes these options as follows:
BASIC – default compression algorithm
HIGH – Best suited for backups over slower networks where the limiting factor is network speed
MEDIUM -Recommended for most environments. Good combination of compression ratios and speed
LOW – Least impact on backup throughput and suited for environments where CPU resources are the limiting factor.
Unfortunately, unless you have purchased the Advanced Compression Option, your only choice is BASIC. Regardless, I did
some testing to see the difference in compression ratio as well as the time it takes to backup. The test script that I
used is pretty simple. It specifies the compression algorithm and then does a full backup of the database and
archivelogs. As a final test, I did a non-compressed rman backup and then used gzip to compress it. While I wouldn't
recommend you do backups in this way, I think it is interesting for comparison purposes.
4.還原:
RMAN> CONFIGURE COMPRESSION ALGORITHM clear ;
old RMAN configuration parameters:
CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
RMAN configuration parameters are successfully reset to default value
RMAN> show COMPRESSION ALGORITHM;
RMAN configuration parameters for database with db_unique_name BOOK are:
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2146651/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RMAN備份以及壓縮原理分析Oracle
- 不同版本下的rman壓縮備份
- RMAN說,我能備份(13)--RMAN中的備份壓縮和加密加密
- Rman增量壓縮備份來解決備份空間不足
- 11g 資料庫rman壓縮備份壓縮率測試資料庫
- Backup And Recovery User's Guide-RMAN備份概念-備份集塊壓縮-未使用塊壓縮GUIIDE
- 【RMAN】使用RMAN的 Compressed Backupsets備份壓縮技術
- [Rman]使用RMAN的Compressed Backupsets備份壓縮技術
- RMAN關於並行機制的壓縮備份並行
- Backup And Recovery User's Guide-RMAN備份概念-備份集-備份集塊壓縮GUIIDE
- Backup And Recovery User's Guide-備份資料庫-RMAN備份概覽-進行壓縮備份GUIIDE資料庫
- ORACLE備份中的壓縮Oracle
- Backup And Recovery User's Guide-RMAN備份概念-備份集二進位制壓縮GUIIDE
- [20171031]rman xxx Failure.txtAI
- Linux備份與壓縮命令Linux
- [20190515]熱備份模式與rman衝突.txt模式
- RAC模式下的備份策略以及RMAN備份指令碼模式指令碼
- SQL Server 2008 備份壓縮SQLServer
- Unix備份與壓縮命令實踐(轉)
- [20140506]rman加密備份.txt加密
- mysqldump壓縮備份匯出匯入(含定期備份shell指令碼)MySql指令碼
- RAC模式下的備份策略以及RMAN備份指令碼(轉)模式指令碼
- RAC模式下的備份策略以及RMAN備份指令碼(ZF)模式指令碼
- mysql資料庫xtrabackup壓縮備份測試MySql資料庫
- LINUX學習(二)備份與壓縮命令Linux
- Backup And Recovery User's Guide-RMAN備份概念-聯機備份和備份模式GUIIDE模式
- RMAN備份、恢復實驗室 之 備份篇 【歸檔模式】模式
- Backup And Recovery User's Guide-備份RMAN備份-使用RMAN備份備份集GUIIDE
- RMAN說,我能備份(9)--RMAN增量備份與備份保留策略
- 【RMAN】RMAN備份至ASMASM
- Liunx運維(六)-檔案備份與壓縮命令運維
- 帝國CMS備份資料壓縮存放目錄
- RMAN說,我能備份(14)--實戰RMAN備份
- rman 備份策略
- RMAN備份原理
- [20130412]rman備份檔案大小.txt
- Backup And Recovery User's Guide-備份RMAN備份-用RMAN備份映象拷貝備份GUIIDE
- oracle 壓縮備份與普通備份從空間,時間,CPU效能的比較Oracle