個(gè)人自行閱讀時(shí)候遥倦,翻譯的文檔。因?yàn)楸容^渣碉考,如果有更合理或者錯(cuò)誤的地方煩勞告知塌计,我會(huì)做修改。
This chapter explains Oracle Database backup and recovery and summarizes the Oracle solutions. This chapter contains the following topics:
? Purpose of Backup and Recovery
? Oracle Backup and Recovery Solutions
? About Oracle Flashback Technology
? About Data Recovery Advisor
? RMAN and Oracle Enterprise Manager Cloud Control
? About Zero Data Loss Recovery Appliance
? Backup and Recovery Documentation Roadmap
譯文:
這篇章節(jié)涵蓋了Oracle 數(shù)據(jù)庫(kù)備份和恢復(fù)以及Oracle解決方案的簡(jiǎn)要概述侯谁,章節(jié)涵蓋了以下主題
? 備份和恢復(fù)的目的
? Oracle備份和恢復(fù)的解決方案
? 關(guān)于Oracle 閃回技術(shù)
? 關(guān)于數(shù)據(jù)恢復(fù)建議
? RMAN和Oracle企業(yè)云管理控制
? 關(guān)于零數(shù)據(jù)丟失恢復(fù)配置
? 備份和恢復(fù)文檔路線(xiàn)圖
Purpose of Backup and Recovery
As a backup administrator, your principal duty is to devise, implement, and manage a backup and recovery strategy. In general, the purpose of a backup and recovery
strategy is to protect the database against data loss and reconstruct the database after data loss. Typically, backup administration tasks include the following:
? Planning and testing responses to different kinds of failures
? Configuring the database environment for backup and recovery
? Setting up a backup schedule
? Monitoring the backup and recovery environment
? Troubleshooting backup problems
? Recovering from data loss if the need arises
譯文:
備份和恢復(fù)的目的
作為一個(gè)備份管理員,你最主要的責(zé)任就是設(shè)計(jì),實(shí)施和管理一個(gè)備份和恢復(fù)策略.通常,備份和恢復(fù)策略是為了防止數(shù)據(jù)丟失和在數(shù)據(jù)丟失后進(jìn)行重構(gòu)數(shù)據(jù)庫(kù).通常锌仅,備份管理的任務(wù)包含以下
? 計(jì)劃和測(cè)試響應(yīng)不同的失敗
? 配置數(shù)據(jù)庫(kù)備份和恢復(fù)環(huán)境
? 建立一個(gè)備份計(jì)劃
? 監(jiān)控備份和恢復(fù)環(huán)境
? 解決備份問(wèn)題
? 在需要的時(shí)候恢復(fù)數(shù)據(jù)丟失
As a backup administrator, you may also be asked to perform other duties that are
related to backup and recovery:
? Data archival, which involves creating a database copy for long-term storage
? Data transfer, which involves moving data from one database or one host to
another
The purpose of this manual is to explain how to perform the preceding tasks.
譯文:
作為一個(gè)備份管理員,你也可能會(huì)被要求執(zhí)行其他的備份和恢復(fù)的職責(zé)
? 數(shù)據(jù)歸檔,涉及到長(zhǎng)期存儲(chǔ)數(shù)據(jù)庫(kù)的拷貝
? 數(shù)據(jù)傳輸,解決數(shù)據(jù)從一個(gè)數(shù)據(jù)庫(kù)或者一臺(tái)主機(jī)移到另一臺(tái)
手冊(cè)的目的是解析如何執(zhí)行前面的任務(wù)
About Data Protection
As a backup administrator, your primary job is making and monitoring backups for
data protection. A backup is a copy of data of a database that you can use to
reconstruct data. A backup can be either a physical backup or a logical backup.
作為一個(gè)備份管理員章钾,你主要的工作是對(duì)數(shù)據(jù)保護(hù)的備份進(jìn)行制定和監(jiān)控,拷貝數(shù)據(jù)庫(kù)的備份以便你可以用它來(lái)重構(gòu)數(shù)據(jù).備份可以是物理備份或者是邏輯備份的其中一種
Physical backups are copies of the physical files used in storing and recovering a
database. These files include data files, control files, and archived redo logs.
物理備份副本的物理文件用于存儲(chǔ)和恢復(fù)數(shù)據(jù)庫(kù)热芹,這些文件包含了數(shù)據(jù)文件,控制文件和歸檔重做日志
Ultimately, every physical backup is a copy of files that store database information to another location, whether on disk or on offline storage media such as tape.
最后贱傀,每一個(gè)存儲(chǔ)數(shù)據(jù)庫(kù)信息的副本文件放在另一個(gè)位置,像在磁盤(pán)或者是離線(xiàn)的磁帶設(shè)備中
Logical backups contain logical data such as tables and stored procedures. You can use Oracle Data Pump to export logical data to binary files, which you can later import into the database. The Data Pump command-line clients expdp and impdp use the DBMS_DATAPUMP and DBMS_METADATA PL/SQL packages.
邏輯備份包含了像表和存儲(chǔ)過(guò)程的邏輯數(shù)據(jù).你可以使用Oracle數(shù)據(jù)泵的方式導(dǎo)出邏輯數(shù)據(jù)到二級(jí)制文件中,你可以在稍后導(dǎo)入到數(shù)據(jù)庫(kù).數(shù)據(jù)庫(kù)泵的客戶(hù)端指令使用PL/SQL包里的 DBMS_DATAPUMP和 DBMS_METADATA中的expdp和impdp
Physical backups are the foundation of any sound backup and recovery strategy.
Logical backups are a useful supplement to physical backups in many circumstances but are not sufficient protection against data loss without physical backups.
物理備份是在所有備份和恢復(fù)策略之中最為可靠的基礎(chǔ).在許多情況下伊脓,邏輯備份是物理備份的有用補(bǔ)充府寒,但沒(méi)有物理備份對(duì)數(shù)據(jù)丟失的保護(hù)是不足夠的。
Unless otherwise specified, the term backup as used in the backup and recovery
documentation refers to a physical backup. Backing up a database is the act of making a physical backup. The focus in the backup and recovery documentation set is almost exclusively on physical backups.
除非另有規(guī)定,備份和恢復(fù)文檔中使用的術(shù)語(yǔ)備份指的是物理備份.備份數(shù)據(jù)庫(kù)是進(jìn)行物理備份的行為报腔。備份和恢復(fù)文檔集中的焦點(diǎn)幾乎完全集中在物理備份上株搔。
While several problems can halt the normal operation of an Oracle Database or affect database I/O operations, only the following typically require DBA intervention and data recovery: media failure, user errors, and application errors. Other failures may require DBA intervention without causing data loss or requiring recovery from
backup. For example, you may need to restart the database after an instance failure or allocate more disk space after statement failure because of a full data file.
雖然一些問(wèn)題可以使一個(gè)Oracle數(shù)據(jù)庫(kù)正常運(yùn)行停止或影響數(shù)據(jù)庫(kù)的I/O操作,只有在以下情況需要DBA干預(yù)和數(shù)據(jù)恢復(fù):介質(zhì)故障纯蛾、用戶(hù)錯(cuò)誤纤房、應(yīng)用程序錯(cuò)誤。其他故障可能需要DBA干預(yù)在沒(méi)有造成數(shù)據(jù)丟失或要求從備份中恢復(fù)茅撞。例如,您可能需要重啟數(shù)據(jù)庫(kù)在實(shí)例失敗后或者由于完整的數(shù)據(jù)文件在語(yǔ)句失敗后需要分配更多磁盤(pán)空間巨朦。
Media Failures
A media failure is a physical problem with a disk that causes a failure of a read from
or write to a disk file that is required to run the database. Any database file can be
vulnerable to a media failure. The appropriate recovery technique following a media
failure depends on the files affected and the types of backup available.
介質(zhì)故障是一個(gè)磁盤(pán)的物理問(wèn)題米丘,它會(huì)導(dǎo)致讀取或?qū)懭氲叫枰\(yùn)行數(shù)據(jù)庫(kù)的磁盤(pán)文件失敗。任何數(shù)據(jù)庫(kù)文件都容易受到介質(zhì)故障的影響糊啡。介質(zhì)故障后的適當(dāng)?shù)幕謴?fù)技術(shù)取決于受影響的文件和可用的備份類(lèi)型拄查。
One particularly important aspect of backup and recovery is developing a disaster
recovery strategy to protect against catastrophic data loss, for example, the loss of an entire database host.
備份和恢復(fù)的一個(gè)特別重要的方面是開(kāi)發(fā)一個(gè)災(zāi)難恢復(fù)策略,以防止災(zāi)難性的數(shù)據(jù)丟失棚蓄,例如堕扶,整個(gè)數(shù)據(jù)庫(kù)主機(jī)的損失。
User Errors
User errors occur when, either due to an error in application logic or a manual
mistake, data in a database is changed or deleted incorrectly. User errors are estimated to be the greatest single cause of database downtime.
用戶(hù)錯(cuò)誤發(fā)生時(shí)梭依,無(wú)論是由于應(yīng)用程序邏輯錯(cuò)誤或手冊(cè)錯(cuò)誤稍算,數(shù)據(jù)庫(kù)中的數(shù)據(jù)已經(jīng)被更改或不正確的刪除。用戶(hù)錯(cuò)誤估計(jì)是單一數(shù)據(jù)庫(kù)停機(jī)時(shí)間最大原因役拴。
Data loss due to user error can be either localized or widespread. An example of
localized damage is deleting the wrong person from the employees table. This type of damage requires surgical detection and repair. An example of widespread damage is a batch job that deletes the company orders for the current month. In this case, drastic action is required to avoid a extensive database downtime.
由于用戶(hù)錯(cuò)誤的數(shù)據(jù)丟失可以是局部或廣泛糊探。局部損害的一個(gè)例子是從雇員表中刪除錯(cuò)誤的人。這種類(lèi)型的損傷需要外科探查和修復(fù)河闰。一個(gè)大范圍損壞的例子是一組作業(yè)科平,刪除當(dāng)前月份的公司訂單。在這種情況下姜性,需要迅速的采取行動(dòng)避免大量的數(shù)據(jù)庫(kù)停機(jī)時(shí)間瞪慧。
While user training and careful management of privileges can prevent most user
errors, your backup strategy determines how gracefully you recover the lost data
when user error does cause data loss.
雖然用戶(hù)培訓(xùn)和有效的管理權(quán)限可以防止大多數(shù)用戶(hù)錯(cuò)誤,您的備份策略決定了在用戶(hù)錯(cuò)誤造成數(shù)據(jù)丟失時(shí)如何優(yōu)雅地恢復(fù)丟失的數(shù)據(jù)部念。
Application Errors
Sometimes a software malfunction can corrupt data blocks. In a physical corruption,
which is also called a media corruption, the database does not recognize the block at all: the checksum is invalid, the block contains all zeros, or the header and footer of the block do not match. If the corruption is not extensive, then you can often repair it easily with block media recovery.
有時(shí)軟件故障會(huì)損壞數(shù)據(jù)塊弃酌。在一個(gè)物理?yè)p壞氨菇,也就是所謂的介質(zhì)損壞,數(shù)據(jù)庫(kù)根本不識(shí)別所有的塊:校驗(yàn)無(wú)效矢腻,塊包含所有的零點(diǎn)门驾,或塊的頭和尾不匹配。如果損壞不大量多柑,那么你可以經(jīng)常輕松的使用塊介質(zhì)恢復(fù)奶是。
About Data Archival
Data archival is related to data protection, but serves a different purpose. For example,you may need to preserve a copy of a database as it existed at the end of a business quarter. This backup is not part of the disaster recovery strategy. The media to which these backups are written are often unavailable after the backup is complete. You may send the tape into fire storage or ship a portable hard drive to a testing facility. RMAN provides a convenient way to create a backup and exempt it from your backup retention policy. This type of backup is known as an archival backup.
數(shù)據(jù)存檔與數(shù)據(jù)保護(hù)有關(guān),但服務(wù)的目的不同竣灌。例如聂沙,您可能需要保存一個(gè)數(shù)據(jù)庫(kù)的副本,因?yàn)樗跇I(yè)務(wù)季度結(jié)束時(shí)存在初嘹。此備份不是災(zāi)難恢復(fù)策略的一部分及汉。備份完成后,寫(xiě)入這些備份的媒體通常不可用屯烦。您可以將磁帶發(fā)送到消防倉(cāng)庫(kù)坷随,或?qū)⒈銛y式硬盤(pán)傳送到測(cè)試設(shè)備。RMAN可以方便地創(chuàng)建一個(gè)備份驻龟,免除您的備份策略温眉。這種類(lèi)型的備份被稱(chēng)為歸檔備份。
About Data Transfer
In some situations you may need to take a backup of a database or database
component and move it to another location. For example, you can use Recovery
Manager (RMAN) to create a database copy, create a tablespace copy that can be
imported into another database, or move an entire database from one platform to
another. These tasks are not strictly speaking part of a backup and recovery strategy,but they do require the use of database backups, and so may be included in the duties of a backup administrator.
在某些情況下翁狐,您可能需要備份數(shù)據(jù)庫(kù)或數(shù)據(jù)庫(kù)組件并將其移動(dòng)到另一位置类溢。例如,你可以使用恢復(fù)管理器(RMAN)創(chuàng)建一個(gè)數(shù)據(jù)庫(kù)副本露懒,創(chuàng)建一個(gè)可以導(dǎo)入到另一個(gè)數(shù)據(jù)庫(kù)表空間副本闯冷,或整個(gè)數(shù)據(jù)庫(kù)從一個(gè)平臺(tái)移動(dòng)到另一個(gè)。這些任務(wù)不是嚴(yán)格地說(shuō)是備份和恢復(fù)策略的一部分懈词,但它們確實(shí)需要使用數(shù)據(jù)庫(kù)備份蛇耀,因此可以包含在備份管理員的職責(zé)中。
Oracle Backup and Recovery Solutions
When implementing a backup and recovery strategy, you have the following solutions available:
在貫徹?cái)?shù)據(jù)備份和恢復(fù)策略中坎弯,你有以下幾種可用的解決方案
? Recovery Manager (RMAN)
Recovery Manager is fully integrated with the Oracle Database to perform a range
of backup and recovery activities, including maintaining an RMAN repository of
historical data about backups. You can access RMAN through the command line or
through Oracle Enterprise Manager.
恢復(fù)管理器是完全集成的Oracle數(shù)據(jù)庫(kù)執(zhí)行范圍備份和恢復(fù)活動(dòng),包括維護(hù)一個(gè)RMAN庫(kù)歷史數(shù)據(jù)備份蒂窒。你可以通過(guò)命令行訪(fǎng)問(wèn)RMAN活通過(guò) 通過(guò)OEM
? Oracle Enterprise Manager Cloud Control
Oracle Enterprise Manager Cloud Control (Cloud Control) provides a graphical
front end and scheduling facilities for RMAN. You enter job parameters, specify a
job schedule, and Cloud Control runs RMAN to conduct the backup and recovery
operations.
OEM云管理提供了前端圖形和RMAN調(diào)度工具,你輸入一個(gè)任務(wù)參數(shù),指定任務(wù)跳讀,云控制臺(tái)運(yùn)行RMAN進(jìn)行備份和恢復(fù)操作
? Zero Data Loss Recovery Appliance (Recovery Appliance)
Recovery Appliance is a cloud-scale Engineered System that provides data
protection for all Oracle Databases in the enterprise. Integrated with RMAN and
Cloud Control, the Recovery Appliance provides a single repository for backups of
multiple databases as described in “About Zero Data Loss Recovery Appliance”.
恢復(fù)設(shè)備是一個(gè)云規(guī)模的工程系統(tǒng)荞怒,提供數(shù)據(jù)企業(yè)中所有Oracle數(shù)據(jù)庫(kù)的保護(hù)洒琢。RMAN和云控制集成,恢復(fù)設(shè)備提供了一個(gè)用于多個(gè)數(shù)據(jù)庫(kù)備份的倉(cāng)庫(kù)作為在“零數(shù)據(jù)丟失恢復(fù)設(shè)備”的描述褐桌。
? User-managed backup and recovery
In this solution, you perform backup and recovery with a mixture of host operating
system commands and SQL*Plus recovery commands.You are responsible for
determining all aspects of when and how backups and recovery are done.
在這個(gè)解決方案中衰抑,您執(zhí)行備份和恢復(fù)使用宿主操作系統(tǒng)命令和SQL * Plus恢復(fù)命令。你負(fù)責(zé)確定各方面何時(shí)以及如何備份和恢復(fù)荧嵌。
These solutions are supported by Oracle and are fully documented, but RMAN is the preferred solution for database backup and recovery. RMAN provides a common interface for backup tasks across different host operating systems, and offers several backup techniques not available through user-managed methods.
這些解決方案通過(guò)Oracle的支持和豐富的文檔支持呛踊,但是RMAN數(shù)據(jù)庫(kù)備份和恢復(fù)是首選解決方案砾淌。RMAN提供的備份任務(wù)在不同的主機(jī)操作系統(tǒng)的一個(gè)通用的接口,并在無(wú)法通過(guò)用戶(hù)管理的方法上提供了多種備份技術(shù)谭网。
Most of this manual focuses on RMAN-based backup and recovery. The most
noteworthy are the following:
基于RMAN備份和恢復(fù)是手冊(cè)重點(diǎn)汪厨。最值得注意的是以下
? Incremental backups
An incremental backup stores only blocks changed since a previous backup. Thus,
they provide more compact backups and faster recovery, thereby reducing the
need to apply redo during data file media recovery. If you enable block change
tracking, then you can improve performance by avoiding full scans of every input
data file. You use the BACKUP INCREMENTAL command to perform incremental
backups.
增量備份只存儲(chǔ)塊一次備份后改變。因此愉择,他們提供了更緊湊的備份和更快的恢復(fù)劫乱,從而減少了需要應(yīng)用重做數(shù)據(jù)文件介質(zhì)恢復(fù)過(guò)程。如果你啟用塊更改跟蹤锥涕,然后你可以通過(guò)避免每個(gè)輸入數(shù)據(jù)文件的完全掃描提高性能衷戈。你使用增量備份命令執(zhí)行增量備份。
? Block media recovery
You can repair a data file with only a small number of corrupt data blocks without
taking it offline or restoring it from backup. You use the RECOVER BLOCK
command to perform block media recovery.
您可以?xún)H使用少量已損壞的數(shù)據(jù)塊修復(fù)數(shù)據(jù)文件使其脫機(jī)或從備份還原层坠。 您使用RECOVER BLOCK命令執(zhí)行塊介質(zhì)恢復(fù)殖妇。
? Binary compression
A binary compression mechanism integrated into Oracle Database reduces the size
of backups.
集成到Oracle數(shù)據(jù)庫(kù)中的二進(jìn)制壓縮機(jī)制減少了備份的大小。
? Encrypted backups
RMAN uses backup encryption capabilities integrated into Oracle Database to
store backup sets in an encrypted format. To create encrypted backups on disk, the
database must use the Advanced Security Option. To create encrypted backups
directly on tape, RMAN must use the Oracle Secure Backup SBT interface, but does not require the Advanced Security Option.
RMAN使用集成到Oracle數(shù)據(jù)庫(kù)中的備份加密功能以加密格式存儲(chǔ)備份集破花。 要在磁盤(pán)上創(chuàng)建加密備份谦趣,數(shù)據(jù)庫(kù)必須使用高級(jí)安全選項(xiàng)。 創(chuàng)建加密備份直接在磁帶上座每,RMAN必須使用Oracle Secure Backup SBT接口前鹅,但不需要高級(jí)安全選項(xiàng)。
? Automated database duplication
自動(dòng)數(shù)據(jù)復(fù)制
Easily create a copy of your database, supporting various storage configurations,
including direct duplication between ASM databases.
輕松創(chuàng)建數(shù)據(jù)庫(kù)的副本尺栖,支持各種存儲(chǔ)配置嫡纠,包括ASM數(shù)據(jù)庫(kù)之間的直接復(fù)制烦租。
? Cross-platform data conversion
跨平臺(tái)數(shù)據(jù)轉(zhuǎn)換
User-managed backup and recovery techniques are covered in chapters Making User-Managed Database Backups through Performing User-Managed Recovery: Advanced Scenarios.
用戶(hù)管理的備份和恢復(fù)技術(shù)覆蓋在使用戶(hù)管理通過(guò)執(zhí)行用戶(hù)管理恢復(fù)的數(shù)據(jù)庫(kù)備份的章節(jié):高級(jí)方案的章節(jié)中介紹延赌。
Whether you use RMAN or user-managed methods, you can supplement physical
backups with logical backups of schema objects made with Data Pump Export utility.
無(wú)論您使用RMAN還是用戶(hù)管理的方法,都可以補(bǔ)充物理備份與使用數(shù)據(jù)泵導(dǎo)出實(shí)用程序進(jìn)行的模式對(duì)象的邏輯備份叉橱。
You can later use Data Pump Import to re-create data after restore and recovery.
Logical backups are mostly beyond the scope of the backup and recovery
documentation.
你可以稍后在還原和恢復(fù)后重新創(chuàng)建數(shù)據(jù)時(shí)使用數(shù)據(jù)泵導(dǎo)入挫以。邏輯備份大多超出了備份和恢復(fù)文檔的范圍
The following table summarizes the features of the different backup techniques.
一下表格總結(jié)了不同備份技術(shù)的功能