Published by : Obay Salah , November 19, 2024

 

The figure above explain the cold backup and recovery process.

1- Shutdown: As we mentioned earlier, the cold backup process is done after the database is shut down.

2- Destination: This is the direction in which the backup will be placed and it is one of three options (Desk, Tape, NFS).

3- Operation System Level: The cold backup process is done at the operating system or ASM level, after closing the database, copies of the database files are made

via the operating system or ASM.

4- Backup: I mean here the files that are backed up (Datafiles & Redolog & Controlfiles), there are other files that can be backed up such as (Parameter File & Archivelog File).

5- No Archivelog Mode: We mentioned that the database originally works in No Archive Mode, which is a mode that does not allow archiving Redo Log Files.

We can do a Cold Backup of the database if it works in this mode.

6- Archivelog Mode: When configuring the database in this mode, we ensure that an archive of Redo Log Files that we need during the recovery process is created.

7- Simple restoring: Here we must point out the difference between (Restore & Recovery)

Restore: means making copies of the files that we lost in the database from the backup copies and returning them to their original location. Therefore, if the database is working in the Noarchive Log mode, we can only perform a Restore in the event of a failure in the database.

8- Restoring + Recovery: It means running an application for the data we need from the Archivelog Files and the Redolog Files that have not been archived. The Recovery process is done after the Restore process. Therefore, we cannot perform Recovery if the database is working in the Noarchive Log mode because we need the archive files in the Recovery process. 8- Restoring+Recovering: This is because the database works in Archivelog mode as we mentioned in the previous paragraph.

9- Complete Recovery: The recovery process is divided into two parts (Complete Recovery & Incomplete Recovery). By Complete Recovery we mean that we can recover the database without losing any data, or in other words, we can return the database to the state it was in before the failure occurred.

10- Possible If: That is, we can perform Complete Recovery if we do not lose the current Control File, the Redo Log File that has not been archived, and the Archive Log Files that we need in the Recovery process.

11- Type: Sometimes we can complete the Complete Recovery process without needing to close the database, in the case of loss of Non-System Data File, for example.

Sometimes we need to complete the recovery after closing the database in the case of loss of System datafile, i.e. there are two types of Complete Recovery, which are (Online & Offline).

12- Incomplete Recovery: That is, we will lose part of the data during the recovery process, because we may have lost the Redo Log File that was not archived or the Archivelog Files that we need in the recovery process.

There are three options in this type of Recovery

(Until SCN & Until Cancel & Until Time).

13- Offline: This is because we may have lost the current Control File or the Redo Log File that was not archived or the Archivelog File files that we need in the Recovery process.

Note: In the case of Incomplete Recovery, the database must be opened after recovery in Resetlogs mode.

Whenever we open database with ‘Resetlogs’ option the log sequence number set to (zero zero one) 001.

Therefore any Backup that was placed before opening the database in Resetlogs mode is no longer valid for recovery because the Log Sequence Number has now changed to (001).

Therefore it is recommended to place a new Backup after opening the database in Resetlogs mode.

Here are the steps to perform a cold backup:-

1- Close the database.

SHUT IMMEDIATE;

2- Make copies via the operating system or via ASM if the database is stored in ASM for the Datafiles, Redolog Files and Control Files.

C:\copy D:\oradata\orcl\* D:\Backup\

Or

cp /u01/oradata/orcl/* /Backup/

So, we have simply made a Cold Backup of the ORCL database, and we can also include the Parameter File and Archive files in the backup process.

Tags : Backup and Recovery

You May Also Like

Comments

no comment yet!