Customize the correct oracle backup policy

Source: Internet
Author: User

Oracle backup policy customization is related to the running of oracle databases. The correct oracle backup policy not only ensures the 24x7 High Performance of database servers, it also ensures the speed and reliability of backup and recovery.

Multi-level backup is used to reduce the time required for daily backup and ensure that the system has a good recovery. There must be a balance between the recovery time and the backup time. For example, you only need to perform a full backup of a database, and then only backup and archive can ensure that the database can be restored to the latest state, but such a recovery time will be intolerable. Multi-level backup is also designed to solve this problem. The following is an example of multi-level backup:

Every six months, a full database backup includes all the data and read-only tablespaces)
A zero-level backup every month does not contain read-only tablespace)
Perform a level-1 backup every week
Perform secondary backup once a day

Changes to any database must be synchronized to the CATALOG directory again and backed up again, such as adding data files) or backed up again. If you change the tablespace to read-only, you can back up archived logs or regularly back up archived logs after each backup. If possible, you can back up the data directly to the tape. Database full backup script

 
 
  1. Run {
  2. Allocate channel c1 type disk;
  3. Allocate channel c2 type disk;
  4. Allocate channel c3 type disk;
  5. Backup full tag 'dbfull' format'/u01/oradata/backup/full % u _ % s _ % P' database
  6. Include current controlfile;
  7. SQL 'alter system archive log current ';
  8. Backup fileaperset 3 format'/u01/oradata/backup/arch % u _ % s _ % P'
  9. Archivelog all delete input; # backup archiving is optional and can be backed up regularly separately
  10. Release channel c1;
  11. Release channel c2;
  12. Release channel c3;
  13. }

Zero-level backup script

 
 
  1. Run {
  2. Allocate channel c1 type disk;
  3. Allocate channel c2 type disk;
  4. Allocate channel c3 type disk;
  5. Backup incremental level 0 tag 'db0' format'/u01/oradata/backup/db0 % u _ % s _ % P'
  6. Database skip readonly;
  7. SQL 'alter system archive log current ';
  8. Backup fileaperset 3 format'/u01/oradata/backup/arch % u _ % s _ % P'
  9. Archivelog all delete input; # backup archiving is optional and can be backed up regularly separately
  10. Release channel c1;
  11. Release channel c2;
  12. Release channel c3;
  13. }

Likewise, we can get scripts for level 1 backup and level 2 backup, such as Level 1 backup.

 
 
  1. Run {
  2. Allocate channel c1 type disk;
  3. Allocate channel c2 type disk;
  4. Allocate channel c3 type disk;
  5. Backup incremental level 1 tag 'db1' format'/u01/oradata/backup/db1 % u _ % s _ % P'
  6. Database skip readonly;
  7. SQL 'alter system archive log current ';
  8. Backup fileaperset 3 format'/u01/oradata/backup/arch % u _ % s _ % P'
  9. Archivelog all delete input; # backup archiving is optional and can be backed up regularly separately
  10. Release channel c1;
  11. Release channel c2;
  12. Release channel c3;
  13. }

If you follow the preceding oracle backup policy, the amount of data to be backed up on a daily basis is only changed in one day. During restoration, a zero-level backup for the current month, three primary backups, six secondary backups, and archive files for the current day can be recovered at most. If this recovery time cannot be accepted, the interval between zero-level backups can be reduced.

After each backup, archive logs before the backup point can be deleted in principle, but for further security and future use of LOGMNR to find the required information ), if conditions are met, archive logs are saved for one year and stored on inexpensive access devices such as tapes.
 

Learn about Oracle OS backup

Importance of Oracle Database Backup

How to Implement ORACLE backup

Oracle backup command to use instances

Oracle single row date functions

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.