RMAN backup and recovery management tool, 1. offline backup (Consistent backup cold backup when the database is not open, the SCN number in the control file and SCN number 1 in all data files
RMAN backup and recovery management tool, 1. offline backup (Consistent backup cold backup when the database is not open, the SCN number in the control file and SCN number 1 in all data files
I. Physical backup
1. offline backup (Consistent backup when the database is not open for cold backup, the SCN number in the control file is consistent with the SCN number in all data files, it can only be restored to the backup point, but can continue to be restored if there is an archived log)
2. Online backup (it must be in archive mode. because the number of changes to all online backup systems is not necessarily the same, all logs after backup are complete)
Ii. database full backup commands
RMAN> backup format'/home/Oracle/backup/% U' database plus archivelog; or
RMAN> backup database plus archivelog delete input; Note: delete input indicates cutting archive logs.
("% U" indicates that a unique file name is generated)
All backup data files, control files, spfile files, and archive logs are stored in the specified location.
Note:
RMAN> backup database format'/home/oracle/backup/% U' plus archivelog;
All the data files backed up are placed in the specified location. Other files are placed in the quick recovery zone.
RMAN> backup database plus archivelog format '/home/oracle/backup/% U ';
Archive logs to the specified location and put other files to the quick recovery zone.
Iii. RMAN commands
Delete two previous backups, including archiving logs
RMAN> delete force noprompt obsolete redundancy 2; (three copies are recommended)
Delete one previous backup, including archiving logs
RMAN> delete force noprompt obsolete;
List backups of all data files
RMAN> list backup of database;
List those backups that contain control file backups
RMAN> list backup of controlfile;
List backups with parameter files
RMAN> list backup of spfile;
List those backups that contain archive log backups
RMAN> list backup of archivelog;
Iv. Restore the archive database with RMAN
Full recovery can only be caused by corrupted data files. Other files are in good condition to be completely restored.
The Recover database can only be executed in the MOUNT state.
Recover datafile 1 can be executed in the database open state
Recover tablespace can be executed in the database open state
V. Incomplete recovery types
Recovery Based on log serial number --------------- current online log corruption
Time-based recovery ------------------------ incorrect user operation
User error operation based on system change no. ----------------------
To use RMAN for Incomplete recovery:
A file cannot be completely recovered, but the entire database cannot be completely recovered;