Repository navigation
13. Backup
Sayan Bhattacharya edited this page Jun 12, 2026
·
11 revisions
Backup = A backup is a copy of datas that is used to restore or recover the database in the event of data loss, corruption and hardware faliures.
Backups are 2 types (a) Physical backup , (b) Logical backup. In PHYSICAL BACKUP is two type (a.1) Cold Backup , (a.2) Hot Backup
(a) Physical Backup : These backup means when we taking backup of a database when it is mount state block by block means copies of the actual phisical files used to store and restore the database. physical files including datafiles ,spfile ,pfile, control files, archived redo log files. this is reliable recovery strategy.
interview qs [ suppose we are taking a physical backup and the database size 2TB so what will be the backup size? ans== is 2TB itself
With Rman tool ,we can take backup of spfile ,control file, archived log files, we can take backup of individual datafile , we can take backup of tablespace . in rman is stored as a binary file.
we taking backup of a database when it is mount state , Rman tool when it takes backup but the backup is stored every all the repository is inside control file, all info is stored in control files.
first and formost rule is when we are taking backup , the database must be up and running , and the database must be archived log mode ,if it is not archived log mode you cannot take rman backup.it will through error.
(b) Logical Backup : These backup means when we are taking backup of a full database , it contains logical data such as single tables backup , individual schemas backup, single row backup . This backup is converted into dump file but inside that it will be sql statements written in binary , stored in sql format.
Schema : When we create an user this is user. and when this user create a table or any object then it is known as schema.
(a.1) Cold Backup (OFFLINE) : It performed when database is shut down and we are taking the backup. means normally in linux cp copy the datafiles and paste somewhere else that time database should be shut down. in industries we never take this backup , it is rare to perform. take lot of time to copy.
(a.2) Hot Backup(ONLINE) : It performed when the database is up and running , and you are taking the backup . mostly or regularly we take hot backup.
we take a backup only archivelog by command === backup archivelog; ( for save the space and remove the archivelog because it take lot of space )