One, backup operations
Standby set
1. Set up a backup tag
Backup Database tag= ' full_bak1′;
Note: Each tag must be unique, and the same token can be used for multiple backups to restore only the most recent backup.
2. Set the backup set size (all the results of one backup are one backup set, be aware of the size of the backup set)
Backup Database maxsetsize=100m tag= ' datafile1′;
Note: Maxsetsize limits the size of the backup set. Therefore, it must be larger than the total data file size of the database, or it will error.
Rman-06183:datafile or datafile copy larger than maxsetsize:file# 1/DATA/ORADATA/SYSTEM01.DBF
3. Set the backup slice size (tape or file system limit)
Run {
Allocate channel C1 type disk maxpicecsize 100m format '/data/backup/full_0_%u_%t ';
Backup Database tag= ' full_0′;
Release channel C1;
}
You can set the size of each backup slice in the ALLOCATE clause to reach tape or system limits.
You can also set the backup slice size in configure.
Configure Channel device type disk maxpiecesize m;
Configure channel device type disk clear;
4. Save policy for backup set
Backup database Keep forever; – Permanent retention of backup files
Backup database Keep until Time= ' sysdate+30′; – Save backup for 30 days
5. Rewrite Configure exclude command
Backup Databas noexclude Keep forever tag= ' test backup ';
6. Check Database errors
Backup validate database;
Use Rman to scan the database for physical/logical errors and do not perform actual backups.
7. Skip offline, inaccessible or read-only files
Backup DATABASE Skip ReadOnly;
Backup database skip offline;
Backup database skip inaccessible;
Backup DATABASE ship readonly skip offline ship inaccessible;
8. Force Backup
Backup Database Force;
9. Backing up data files based on last backup time
1> only new data files that are added
Backup database not backed up;
2> Backup of data files that are not backed up in a limited time period
Backup database not backed up since Time= ' sysdate-2′;