Forum Discussion

  • The simple answer to what is a hot (online) versus cold (offline) backup of an Oracle Database is that a hot backup is taken while the database is open while a cold backup is taken while the database is closed.
     
    When the database is closed, no changes are being written to the data files or the control files. The method used to move the database files doesn't really matter as long as the utility used can read the files and the files look the same after a restore as they did when they were backed up. This means the files can be moved with Oracle utilities like RMAN, OS utilities like cp, storage utilities that can move a file system, or even hypervisor utilities that can move an entire virtual device.
     
    When the database is open, any backup of the data files or control files is considered a hot or online backup and the restore of any of those files will always require database recovery. This is important to remember because the data files could easily be copied from one place to another but unless certain requirements are met before that copy takes place, those data files will not be recoverable and the backup will be worthless.
     
    Before a hot backup can be completed successfully, the database must be in archivelog mode, which means the database is saving every change that is happening to the database to archive log files. The database requires one or more of these files to recover the data and control files after a restore of an online backup is completed, which means some or all of the archive logs also have to be backed up.
     
    The only disadvantage of a cold backup is that the database must be closed during the entire backup, making the database inaccessible to end users. If this is not an issue, a cold backup will always be a better option because among the many advantages are; no recovery is required during a restore, archivelog mode is not required, restores are much less complex, much lower risk of errors, and backing up and managing archive logs is not required.