Validate > monitor the jobs,crosscheck the metadata, confirm the recovery.
Safety > RMAN backup commands are generally safe , but deletion,encryption,retention ,destination change can effect the recoverability. never delete the backups or archive logs before confirmation done of backup status, requirments, and recovery objectives.
Rman backup repository > in oracle database , the RMAN BACKUP SET is the logical container of one or more physical files that is called BACKUP PIECES, and all of which are tracked and managed by RMAN BACKUP REPOSITORY.
so RMAN BACKUP REPOSITORY is the collection of metadata about your target database and its backups, RMAN uses this metadata to conduct a automated backup process, restoreation , and recovery operations.
BACKUP SETS > A backup set is the logical grouping of one or more files which are created during the rman backup commands.
BACKUP PIECES > A backup pieces is the actual OS physical files which are created in the original storage during backup process.
..
2. RMAN flowchart
3 . RMAN Repository Architechture
4. Core RMAN concept
Target Database = RMAN TARGET /
Recovery Catalog = RMAN CATALOG rman@RCAT
Channels = DEVICE TYPE DISK
Backup sets = BACKUP DATABASE
Backup pieces = db_123_1_1.bkp
Image Copy = BACKUP AS COPY DATABASE
Tag = TAG = 'WEEKLY_FULL_BACKUP'
Check point SCN = USING DURING RESTORE/RECOVER
Obsolete = REPORT OBSOLETE
Expired = LIST EXPIRED BACKUP
Available = STATUS 'A'
.
5. Backup types
Full backup [RMAN> backup database; ]
A full backup means it takes backup of all files block by block , but automatically an incremental level 0 or 1 backup unless maintioned
9. Archive log since time = > backup archivelog from time "sYSDATE1";
4. backup with tag and format = > backup database tag 'monthly_full_backup' format '/u01/backup/monthly_%d_%T_%U.bkp';
13. RMAN JOBS
RMAN BACKUP JOB HISTORY >
select session_key,input_type,status,start_time,end_time,elapsed_seconds,input_bytes_display,output_bytes_display,compression_ratio from v$rman_backup_job_details order by start_time desc fetch first 30 rows only;
current and recent rman operation >
select session_recid,session_stamp,operation,status,start_time,end_time,object_type,output_bytes from v$rman_status where start_time > sysdate-7 order by start_time desc;
RMAN output >
select recid,stamp,output from v$rman_output order by recid;
long operation >
select sid,serial#,opname,sofar,totalwork,units,round(sofar*100/nullif(totalwork,0),2) as pct_done,elapsed_seconds,time_remaining from v$session_longops where opname like 'RMAN%' and totalwork > 0 and sofar <> totalwork order by start_time;
backup piece >
select handle,status,device_type,bytes/1024/1024 as size_mb,start_time,completion_time,compressed from v$backup_piece order by completion_time desc fetch first 50 rows only ;
list backup of database ;
list backup of archivelog all;
list copy;
list expired backup;
.
crosscheck backup;
crosscheck archivelog all;
crosscheck copy;
15. validation
a. validate database blocks > validate database;
16.control file and spfile protection
17. common errors
18. Production safe RMAN CHECKLIST
.
19. practical assesment
a. RMAN repository > in oracle database , the RMAN BACKUP SET is the logical container of one or more physical files that is called BACKUP PIECES, and all of which are tracked and managed by RMAN BACKUP REPOSITORY.
so RMAN BACKUP REPOSITORY is the collection of metadata about your target database and its backups, RMAN uses this metadata to conduct a automated backup process, restoreation , and recovery operations.
b. Connect RMAN :
c. Run show all; and Configure retention policy for 14 day :
d. Enable control file autobackup on , Configure channel and set a format :