Backup and Recovery Flashcards
Complete VS Incomplete Recovery
Complete: All backup files including archive and redo logs are recovered
Incomplete: not all archived log data or redo log data can be restored
Offline or Cold backups
The database is shutdown during the backup process.
Physical structure is backed up.
Online or Hot backups
The database is available to users during the backup process.
Physical structure is backed up.
Exports
The database is available to users, but only the data is backed up. Not the physical structures.
Restore vs. Recovery
Restore: physical files are copied from a backup and replace damaged files
Recovery: more extensive repairs are needed than just the copying of a file.
ex: archived logs or redo log files are applied.
offline backup proccess
cleanly shutdown(no abort)
copy datafiles, control files, redo log files to another location
recommended to backup pfile and archive logs too
restoring from cold backup
If database has not been started since backup recover just replace the damaged files.
if it has been started then restore all datafiles, control files, and redo log files.
Hot backup process.
One by one or all at once place table spaces into backup mode. this redirects all incoming changes to the redo log.
copy files in OS
Also backup any archived log files.
end backup mode to recover datafiles (write all stalled transaction and return normal functionality).
Recover hot backup
Mount the database
Restore the specific datafile from the online backups
Recover the datafile if needed:
RECOVER DATAFILE ‘/’
Exports are?
Exports deal only with the logical structures of a database.
Used to backup and recover data related failures.
The physical file structures must already exist.
exports
generates dump file via data pump tool command expdp
there are command options to dump individual tables, whole schemas, or the entire database
Imports
writes to database from dump file via data pump command impdp
there are options for tables with structure and data or just data
Import appends import data to the end of the existing rows of data.
Data Dictionary Views
Table spaces in backup mode v$backup
datafile info v$datafile
SCN values V$LOG_HISTORY
Point in time recovery
Archived logs are applied up to a specific point-in-time.
time can be selected via until change (scn#), time, or cancel(end of log)
Start up levels
NOMOUNT
Instance started (instance = background processes and memory structure allocation)
Spfile read.
MOUNT
control files opened
OPEN
Datafiles and redo log files are opened.