Backup Database
To be able to survive a disaster each database needs to perform the actions that follow.
Daily
- RMAN backup.
Daily incrementals and a weekly full if using the traditional method.
Weekly
- Backup of your core config files including:
- An ASCII parameter file (pfile).
CREATE PFILE='R:\rman\init.ora' FROM SPFILE;
- Backup of your network config files (listener.ora, tnsnames.ora, sqlnet.ora etc.)
- An ASCII parameter file (pfile).
- Backup of a file that lists all the locations of the database files (.arc, .ctl, .dbf, .rdo etc.).
- Backup of your essential scripts and logs.
Monthly
- RMAN validation operation.
RMAN Backup Methods
Traditional Method
$ORACLE_HOME/bin/rman target sys/MyPassword nocatalog
RMAN> backup database plus archivelog;
Incremental Merge Backup
$ORACLE_HOME/bin/rman target sys/MyPassword nocatalog
RMAN> run { recover copy of database with tag 'incremental_merge_backup'; backup incremental level 1 cumulative copies=1 for recover of copy with tag 'incremental_merge_backup' database; }
Click here for detailed info on Incremental Merge Backups.
Completion Status
Success
An RMAN backup is successful when you see this message displayed at the end of the RMAN backup log:
Recovery Manager complete
Failure
Here is an example error block header:
RMAN-00571: ====================================================== RMAN-00569: ========= ERROR MESSAGE STACK FOLLOWS ================ RMAN-00571: ======================================================
Total of All RMAN Files On Disk
Total Size of All Files for Given Day (ex: 2024-03-29)
- Place on one line.
- Change path (/u05/rman).
- Change dates to match day of files desired.
find /u05/rman -type f -newermt 2024-03-29 ! -newermt 2024-03-30 -exec stat --format="%s" {} \; | awk '{total += $1} END {print "Total size:", total/1073741824, "GB"}'
644.743 GB