Monday, June 13, 2011

Hot & Cold Backup: -

COLD BACKUP : Backup taken when the database is offline or shutdown.
1. Shut down the Application services and database.

2. Login as Database owner ie ‘oracle’ user in our case.

3. Create a directory for backup. Go to the directory where you want to take the backup

4. Copy all the files in the DATA_TOP ie /oraDB/db/apps_st/data to backup directory
by typing the following command:
$cp –r . /oraDB/db/apps_st/data/*

Note the dot ( which indicates the present location)
It takes quite a long time for the backup to finish. So do this activity when you have enough

HOT BACKUP A backup taken when the database is up and running.The pre-requisite for taking a hot backup of the database is that the database has to be in archive log mode.
1. Check if the database is in archive log mode by typing the following command at SQL prompt
of oracle user and press Return
SQL> archive log list;
which shows the archive log file location and archive log mode
If it shows Archive Mode then

2. At SQL prompt type the following command.
Begin the backup mode for the entire database
SQL>alter database begin backup;

3. Go to the Operating System in another terminal and login as oracle user.
Copy all the files in DATA_TOP as mentioned above to the backup directory.
$cp –r . /oraDB/db/apps_st/data/*

4. Once copied,End the backup mode of the database by typing the following command at SQL prompt
SQL>alter database end backup;

Sukhwinder Singh

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.