Backup Oracle Database
There are 2 main types of backup in Oracle.
1- Physical Backup
2- Logical Backup
But in this blog we will focus on physical Backup. In physical backup, all files such as datafiles, controlfile and archive redolog files are stored physically on other disk or some other medium like tape storages. Further we can take 2 types of physical backup. i.e cold backup and hot backup.
--Cold backup: It is type of backup when we stop the database server to perform any operations on database and we close the database, that is database is in mount stage, it is
the most safiest way of complete/full backup. It can be called as offline backup.
--Hot backup: It is type of backup when operations are being performed on database by the users and we take the backup, but for this type of backup to be full/completed we need database
to be in archive log mode (please read archive log mode blog), This type of backup is also called as hot backup.
Backup through RMAN:
--Cold backup:
Sqlplus / as sysdba
sql> alter database close; or
sql> shutdown immediate;
sql> startup mount;
this will take you to mount state, now you are ready to go offline or cold backup:
$ rman target /
rman> backup database;
exit
--Hot backup:
Full Datafiles backup:
$ rman target /
or
$ rman target user/password
rman> backup database;
rman> exit;
Full Datafiles backup plus archivelog:
$rman target /
rman> backup database plus archivelog;
rman> exit;
There are 2 main types of backup in Oracle.
1- Physical Backup
2- Logical Backup
But in this blog we will focus on physical Backup. In physical backup, all files such as datafiles, controlfile and archive redolog files are stored physically on other disk or some other medium like tape storages. Further we can take 2 types of physical backup. i.e cold backup and hot backup.
--Cold backup: It is type of backup when we stop the database server to perform any operations on database and we close the database, that is database is in mount stage, it is
the most safiest way of complete/full backup. It can be called as offline backup.
--Hot backup: It is type of backup when operations are being performed on database by the users and we take the backup, but for this type of backup to be full/completed we need database
to be in archive log mode (please read archive log mode blog), This type of backup is also called as hot backup.
Backup through RMAN:
--Cold backup:
Sqlplus / as sysdba
sql> alter database close; or
sql> shutdown immediate;
sql> startup mount;
this will take you to mount state, now you are ready to go offline or cold backup:
$ rman target /
rman> backup database;
exit
--Hot backup:
Full Datafiles backup:
$ rman target /
or
$ rman target user/password
rman> backup database;
rman> exit;
Full Datafiles backup plus archivelog:
$rman target /
rman> backup database plus archivelog;
rman> exit;
No comments:
Post a Comment