2 Day DBA > Backing Up and Recovering > Backing Up and Restoring th... > About Backing Up and Restor...
About Backing Up and Restoring the Database |
Previous |
Next |
Backing up and restoring Oracle Database XE is based on protecting the physical files that make up the database: the datafiles, the control file, the server parameter file (SPFILE
), and, if in ARCHIVELOG
mode, the redo log files.
In Oracle Database XE, the database backup and recovery facility is based upon the Recovery Manager (RMAN
) utility that is integrated into the database. Although there is an RMAN
command line client similar to SQL Command Line, you do not need to interact with it directly to back up or restore your database. Oracle Database XE includes backup and restore scripts that you access using menu choices on your desktop. These scripts perform a full backup and restore of the entire database, and store backup files in the flash recovery area.
Automatic Management of Backup Storage
Oracle Database XE implements a backup retention policy that dictates that two complete backups of the database must be retained, to provide a level of redundant protection for the database. In ARCHIVELOG
mode, all archived logs required for media recovery from either backup are also retained. The database automatically manages backups and archived logs in the flash recovery area, deleting any that are obsolete (no longer needed to satisfy the retention policy) as space is needed for new files. The backup script provided with Oracle Database XE also deletes obsolete backups and archived logs at the end of each backup job.
The provided backup script performs online backups of databases in ARCHIVELOG
mode and offline backups of databases in NOARCHIVELOG
mode. Online backups are backups that can run while the database is running. Offline backups are backups that run when the database is shut down.
The provided restore script restores the database differently depending on whether log archiving is on or off:
Log archiving on (ARCHIVELOG
mode)—The restore script restores the backed up database files, and then uses the online and archived redo log files to recover the database to the state it was in before the software or media failure occurred. All committed transactions that took place after the last backup are recovered, and any uncommitted transactions that were under way when the failure took place are rolled back (using undo data from the restored undo tablespace).
Log archiving off (NOARCHIVELOG
mode)—The restore script restores the database to its state at the last backup. Any transactions that took place after the last backup are lost.
See Also:
|