Hot Backup

A hot backup (also known as an online backup) is a physical backup that is taken when the database is operational—that is, “hot.” Oracle provides specific support for hot backups through archivelog mode and the ALTER TABLESPACE BEGIN/END BACKUP commands. Tablespaces are placed into backup mode, backed up, then taken out of backup mode. Oracle performs a checkpoint of all datafiles in a tablespace when a tablespace is placed into backup mode, and records the checkpoint number in the header of all datafiles.

Before you back up a datafile, its tablespace must be placed in backup mode with the command:

ALTER TABLESPACE BEGIN BACKUP

At this point, the database marks the datafile(s) as being in backup mode and starts writing information to the redo log at the block level, rather than at the byte level. You may then back up the datafile using any mechanism you choose. Once the datafile has been backed up, you issue the command:

ALTER TABLESPACE END BACKUP

This tells the database to resume normal operation.

Warning

When performing hot backups, it is imperative that you follow the procedure we describe here. Standard operating system backups of the database files while the tablespace is not in backup mode will not work.

Get Oracle Database Administration: The Essential Refe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.