Backup
Backup
A database backup is a copy of data that can be used to reconstruct the data. Oracle backup types can be divided into two categories.
1. All datafiles have the same SCN; in other words, all changes in the redo logs have been applied to the datafiles.
3. Consistent backups are taken when the database is shut down normally or in a MOUNT state.
Inconsistent backup
1. Is performed while the database is open and users are accessing the database.
2. Typically SCNs of the datafiles typically do not match when an inconsistent backup is taking place, a recovery operation performed using an
inconsistent backup must rely on both archived and online redo log files to bring the database into a consistent state before it is opened.
Full backups
Include all blocks of every datafile within a tablespace or a database;
it is essentially a bit-for-bit copy of one or more datafiles in the database.
Can be created with RMAN or with OS-level file copy commands
Incremental backups
Backup of block level changes to database made after previous incremental/full backup. can be level 0 or level 1.
“Level 0? Incremental backup - This backs up all blocks in database. This is equivalent to full backup.
“level 1? Incremental backup- This backs up database block changes after previous incremental backup. If there is no level 0 incremental backup and
you run level 1 incremental backup, RMAN will automatically make level 0 incremental backup.
Cumulative incremental backup - level 1 incremental backup which includes all blocks changed since most recent level 0 incremental backup.
cumulative backups may take more time and space than non- cumulative, however only one cumulative backup from any level will be needed for recovery
Differential incremental backup - level 1 incremental backup which includes only block changed since most recent incremental backup. By default,
incremental backups are differential
A distinct advantage to using an incremental backup in a recovery strategy is that archived and online redo log files may not be necessary to restore a
database or tablespace to a consistent state
The incremental backups may have some or all of the blocks needed.
Incremental backups can only be performed within RMAN.
incremental backups can only be performed on datafiles, and not on control files or archived redo logs.
if the incremental keyword is not included, by default recovery manager will perform a full backup.
During recovery, incremental backups are chosen by recovery manager, and applied automatically
in the case that archived redo logs were not successfully backed up (or were corrupted), incremental backups offer a way of making the datafile newer
without needing this redo. conversely, if the tape that an incremental backup resides on is corrupt, archived redo logs can be used to roll forward.
Incremental backups can be applied in parallel to multiple datafiles concurrently.
Much less redo is applied during recovery.
Image Copies
Backup set is a collection of files called backup pieces, each of which may contain the backup of one or several database files
Backupsets can be created and restored only with RMAN.
Each backup piece belongs to only one backupset.
All backupsets and pieces are recorded in the RMAN repository
Compressed Backups
Compression is available to reduce the amount of disk space or tape needed to store the backup.
Compressed backups are only usable by RMAN
Need no special processing when used in a recovery operation;
RMAN automatically decompresses the backup.
Creating compressed backups is as easy [as compressed backupset]
Tablespace Backups
A tablespace backup is a subset of the database. Tablespace backups are only valid if the database is operating in ARCHIVELOG mode. The only time a
tablespace backup is valid for a database running in NOARCHIVELOG mode is when that tablespace is read-only or offline-normal.
Datafile Backups
A datafile backup is a backup of a single datafile. Datafile backups, which are not as common as tablespace backups and are only valid if the database is
run in ARCHIVELOG mode. The only time a datafile backup is valid for a database running in NOARCHIVELOG mode is if that datafile is the only file in a
tablespace. For example, the backup is a tablespace backup, but the tablespace only contains one file and is read-only or offline-normal.