If you are puzzled by common Oracle backup commands in actual operations, you can use the following articles to understand the actual application and functions, the following is a detailed introduction of the article. I hope you will gain some benefits after browsing the following content.
Oracle Summary of common backup commands
1. Set the backup tag
- backup database tag='full_bak1';
Note: Each tag must be unique. The same tag can be used for multiple backups to restore only the latest backups.
2. Set the backup set size (all results of one backup set are regarded as a backup set. Pay attention to the backup set size)
- backup database maxsetsize=100m tag='datafile1';
Note: maxsetsize specifies the size of the Backup set. Therefore, it must be larger than the total data file size of the database; otherwise, an error is reported.
- RMAN-06183: datafile or datafile copy larger
than MAXSETSIZE: file# 1 /data/oradata/system01.dbf
3. Set backup slice size (tape or File System Restrictions)
- run {
- allocate channel c1 type disk maxpicecsize
100m format '/data/backup/full_0_%U_%T';
- backup database tag='full_0';
- release channel c1;
- }
Common Oracle backup commands Summary: You can set the size of each backup piece in The allocate clause to meet the tape or system restrictions.
You can also set the backup Part Size in configure.
- Configure channel device type disk maxpiecesize 100 m;
- configure channel device type disk clear;
4. Backup set Storage Policy
- backup database keep forever;
-- Permanently retain the backup file
- backup database keep until time='sysdate+30';
-- Save the backup for 30 days
5. Rewrite the configure exclude command.
- backup databas noexclude keep forever tag='test backup';
6. Check for database errors
- backup validate database;
Use RMAN to scan for physical/logical errors of the database without performing actual backup.
7. Skip offline and cannot access 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. Forced backup
- backup database force;
9. Back up data files based on the last backup time
1> only backup New Data Files Added
- backup database not backed up;
2> back up data files that have not been backed up "within a limited period of time"
- backup database not backed up since time='sysdate-2';
10. Summary of common Oracle backup commands check logical errors during backup operations in the memo
- backup check logical database;
- backup validate check logical database;
11. Generate backup copies
- backup database copies=2;
12. Backup Control File
- backup database device type disk includ current controlfile;
The above content is a summary of common Oracle backup commands and I hope you will find some gains.