A backup is a copy of data and this copy can include important parts of your database such as the control file and datafiles. A backup is a safeguard against unexpected data loss and application errors. If you lose the original data, then you can use the backup to reconstruct it.
Backups are divided into
- physical backups and
- logical backups.
Physical backups are copies of physical database files. In contrast, logical backups contain data that you extract using the Oracle Export utility and store in a binary file. You can use logical backups to supplement physical backups. You can make physical backups using either the Oracle Recovery Manager utility or operating system utilities.
To restore a physical backup is to reconstruct it and make it available to the Oracle database server.
To recover a restored datafile is to update it using redo records, which are
records of changes made to the database after the backup was taken. If you use
Recovery Manager (RMAN), then you can also recover restored datafiles using incremental backups, which are backups of a datafile that contain only blocks that changed after the last backup.
Oracle performs crash recovery and instance recovery automatically after an instance failure. Instance recovery is an automatic procedure that involves two distinct operations:
- rolling forward the backup to a more current time by applying online redo records and
- rolling back all changes made in uncommitted transactions to their original state.
In contrast to instance recovery, media recovery requires you to issue recovery commands. If you use SQL*Plus, then you can issue the RECOVER or
ALTER DATABASE RECOVER
statements to apply the archived logs.
If you use RMAN, then you issue the recover command to apply archived redo logs or incremental backups to the datafiles.
Figure 1-2 illustrates the basic principle of backing up, restoring, and performing media recovery on a database: