oracle中Exadata 備份恢複案例

來源:互聯網
上載者:User

Exadata的備份恢複跟普通單機或者RAC資料庫的備份恢複基本面是一樣的,但是針對多節點還是有一些最佳化的最佳實務。今天就簡單談談針對Exadata的備份和恢複。

為充分利用Exadata的I/O能力和多節點的優勢,建議先在每個DB節點上分配2個通道進行測試。另外,為了讓所有的DB節點都能參與到備份任務中,可以在每個節點建立一個failover類型的service。下面是一個實際的測試組態和指令碼,僅供參考。

srvctl add service –d df –s bkup1 –r df1 –a df2 ,df3 ,df4
srvctl add service –d df –s bkup2 –r df2 –a df1 ,df3 ,df4
srvctl add service –d df –s bkup3 –r df3 –a df1 ,df2 ,df4
srvctl add service –d df –s bkup4 –r df4 –a df1 ,df2 ,df3

srvctl start service -d df

export ORACLE_HOME
export NLS_DATE_FORMAT=”YYYY/MM/DD HH24:MI:SS”
begin_time_sec=`date +%s`

set echo on
run
{
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE DEVICE TYPE DISK PARALLELISM 8;

allocate channel ch01 device type disk connect ‘sys/welcome1@x3-scan/bkup1’;
allocate channel ch02 device type disk connect ‘sys/welcome1@x3-scan/bkup2’;
allocate channel ch03 device type disk connect ‘sys/welcome1@x3-scan/bkup3’;
allocate channel ch04 device type disk connect ‘sys/welcome1@x3-scan/bkup4’;
allocate channel ch05 device type disk connect ‘sys/welcome1@x3-scan/bkup1’;
allocate channel ch06 device type disk connect ‘sys/welcome1@x3-scan/bkup2’;
allocate channel ch07 device type disk connect ‘sys/welcome1@x3-scan/bkup3’;
allocate channel ch08 device type disk connect ‘sys/welcome1@x3-scan/bkup4’;
backup
as backupset
incremental level 0
section size 128g
database;
}
end_time_sec=`date +%s`

total_execution_time_sec=`expr ${end_time_sec} – ${begin_time_sec}`

echo “Script execution time is $total_execution_time_secseconds”

下圖是一個官方資料的截圖,原文可以參考白皮書

從上圖可以看到,在11203的版本下,滿配的X2-2(X3-2),磁碟的備份速度可以達到每小時20-25TB。在11202版本下,可以達到每小時17-18TB。

針對恢複,同理,下面是一段參考指令碼:
此樣本是在1/8配置的環境下進行的測試,使用了16個channel,針對每個node建了一個service。注意此處是針對錶空間而非全庫的恢複,稍加修改可以進行全庫的恢複。

run
{

allocate channel ch01 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch02 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch03 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch04 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch05 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch06 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch07 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch08 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch09 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch010 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch011 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch012 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch013 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch014 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch015 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch016 device type disk connect ‘sys/oracle@bg2’;

sql ‘ALTER TABLESPACE eighth OFFLINE IMMEDIATE’;
restore tablespace eighth;
recover tablespace eighth;
sql ‘ALTER TABLESPACE eighth ONLINE’;

}

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.