Oracle Physical Backup
Published by : Obay Salah , November 19, 2024
The figure shows the types of Oracle database backups (Physical & Logical & RMAN),
In this chapter we will talk about physical backup and recovery.
But before going into detail on this topic, some quick notes are necessary. What is a physical backup: It is a copy of the physical database files
or those that we can deal with through the operating system. In the logical backup, we used an export tool such as Export Utilities and not only through the operating system, because the objects that we exported in the backup Logical backup cannot be viewed through the operating system such as tables, views and procedures, hence the name logical backup, while in physical backup all files that are copied are File OS.
Types of physical backup:
1- Cold: It is the cold physical backup, and the word cold comes from the fact that the copy is after closing the database.
2- Hot: It is the hot physical backup, and it is a copy of the database without closing it.
Archivelog Files Management:
Before going into detail on the subject of physical backup, it is necessary to talk about this subject in some detail.
Database Mode:
1- NOARCHIVELOG (Default).
2- ARCHIVELOG (Optional)
We mentioned earlier that the Redo Log File is used to record the changes that
occur to the data so that the changes that have been installed or not are recorded. We benefit from this file in retrieving the database in the event of a failure, so that there is some data
that has not been written in the Data Files while it was written in These files. I also mentioned that the Redo Log File is in the form of a GROUP so that each database works on
written in these files. I also mentioned that the Redo Log File is in the form of a GROUP so that each database works on at least two of the Groups.
So this file is used as a basis for the recovery process in case of an error. It contains the changes that occur to the database.
To ensure the preservation of this file, each Group is organized in the form of Members and each Member within the Group is a copy of the original, the goal of which is to reduce the risk of loss.
LGWR Background Process writes the data in the Buffer log Redo to the Redo Log Files.
The moment the Redo Log File is filled, the LGWR switches to the other Redo Log File in A process known as Switch Log.
Then it switches back to the first Redo Log File in a circular process, erasing the data and rewriting it again, meaning that we lose the data that is in it, which is
the changes that occur in the database and that we need in the recovery process.
Let's say, for example, that you made a backup on Sunday morning and the database failed on Tuesday and we need to restore the database. In this case, you can only restore the database to the last backup, which is Sunday, and we cannot perform a recovery after that because we lost The data we need
In the Recovery process is in the Redo Log File as a result of rewriting in the File Log Redo.
What is the solution then? The solution is to create an archive in which we keep copies of the Redo Log File before rewriting it, in other words we run the database in Archivelog Mode.
The database originally works in NOARCHIVELOG mode, meaning that File Redo files are not archived, so we can only restore the database to the last backup in the event of a database failure.
Comments
no comment yet!