Physical Backups  «Prev  Next»

Lesson 5 Performing a closed database backup
Objective Perform a closed database backup.

Performing Closed Database Backup

Once you have prepared your database and identified the necessary files, use the following steps to perform a closed database backup:
Step 1: First, shut down the Oracle instance with the SHUTDOWN NORMAL or the SHUTDOWN IMMEDIATE command.
It is important to note that the database must be shut down properly or you will have backed up a crashed database, which is problematic in certain recovery scenarios. An example of an improper shutdown would be to use the
shutdown abort 
command. The shutdown abort command is still available in Oracle 13c. It remains a valid option for forcefully shutting down the database instance. If this happens, you have to restart the database and shut it down properly.

The default shutdown parameter is "normal."
The database will not shut down with the command
, until the last user logs off. Use SHUTDOWN IMMEDIATE if there is any chance the database is still being accessed to avoid waiting for the last user to log off.
Step 2: Second, back up all datafiles, redo log files, control files, parameter files, and the password files with an operating system backup utility. Although parameter and password files are not physically part of the database and do not contain any user data, they are important because the files contain essential information about database startup and configuration. In order to ensure that every file is correctly backed up, a reliable and automated procedure for this operation can be established by creating and executing a simple script.
  1. Next, restart the Oracle instance.

  2. The image below illustrates the "closed backup process".

Closed database backup in Oracle: 1) SHUTDOWN IMMEDIATE 2) COPY 3) STARTUP OPEN
Closed database backup: 1) SHUTDOWN IMMEDIATE, 2) COPY, 3) STARTUP OPEN

Performing Closed Database Backup in Oracle

The following series of steps below demonstrates the steps of a "closed database backup". A DBA can perform a closed database backup in Oracle 12c. This is known as an offline backup, and it is the most common type of backup for Oracle databases. To perform a closed database backup, you would first need to shut down the database using the `SHUTDOWN NORMAL` command. Once the database is shut down, you can use the Oracle Recovery Manager (RMAN) to back up the database files. Here are the steps to perform a closed database backup in Oracle 12c using RMAN:
  1. Start RMAN.
  2. Connect to the target database.
  3. Run the following command to back up the database files:

  1. RMAN will prompt you to specify the location where you want to save the backup files.
  2. Once you have specified the location, RMAN will begin backing up the database files.
  3. Once the backup is complete, RMAN will display a confirmation message.

You can also use RMAN to back up specific tablespaces or data files. To do this, you would use the `BACKUP` command and specify the names of the tablespaces or data files that you want to back up.
Example: Here is an example of how to back up a specific tablespace using RMAN:

Here is an example of how to back up a specific data file using RMAN:
RMAN> BACKUP DATAFILE '/u01/oradata/orcl/system01.dbf';

Once you have backed up the database, you can restart the database using the `STARTUP` command. It is important to note that you should always test your backups to ensure that they are working properly. You can do this by restoring the backups to a test environment.
The next lesson covers the advantages, disadvantages, and requirements for open database backup.

Performing Backup - Quiz

Click the link below to review your understanding of closed database backup options and methods.
Performing Backup - Quiz

SEMrush Software