Common Oracle backup commands

Source: Internet
Author: User

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

 
 
  1. 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)

 
 
  1. 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.

 
 
  1. 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)

 
 
  1. run {  
  2. allocate channel c1 type disk maxpicecsize 
    100m format '/data/backup/full_0_%U_%T';  
  3. backup database tag='full_0';  
  4. release channel c1;  
  5. }   

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.

 
 
  1. Configure channel device type disk maxpiecesize 100 m;  
  2. configure channel device type disk clear;  

4. Backup set Storage Policy

 
 
  1. backup database keep forever;  

-- Permanently retain the backup file

 
 
  1. backup database keep until time='sysdate+30';  

-- Save the backup for 30 days

5. Rewrite the configure exclude command.

 
 
  1. backup databas noexclude keep forever tag='test backup'; 

6. Check for database errors

 
 
  1. 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

 
 
  1. backup database skip readonly;  
  2. backup database skip offline;  
  3. backup database skip inaccessible;  
  4. backup database ship readonly skip offline
     ship inaccessible;  

8. Forced backup

 
 
  1. backup database force; 

9. Back up data files based on the last backup time

1> only backup New Data Files Added

 
 
  1. backup database not backed up; 

2> back up data files that have not been backed up "within a limited period of time"

 
 
  1. 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

 
 
  1. backup check logical database;  
  2. backup validate check logical database;  

11. Generate backup copies

 
 
  1. backup database copies=2; 

12. Backup Control File

 
 
  1. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.