Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Rman backup level and backup script

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Rman backup level and backup script

Basics:

Oracle backup levels are level 0 level level 1 and level 2; but level 2 is not commonly used, just a little explanation here, here, level 0 > level 1 > level 2.

Database fulfillment is the same as level 0 backup, but it cannot be used as the basis for other backups, while level level 0 backup can be used as a front for other backups.

Oracle backups are divided into incremental backups (incremental, default) and cumulative backups (cumulitive); incremental backups are content changes after the last peer or higher backup. The content of the cumulative backup is the change since the last higher-level backup.

For example, if the backup order is 0-> 1-> 2, then the next backup (level 2) will back up the changes in the data content between the third backup (level 2) and the fourth backup (level 2) if it is an incremental backup; if it is a cumulative backup, then back up the data content changes between the second backup (level 1) and the fourth backup (level 2).

0 = complete

1 = difference increment the last complete increment or the increment since LV1 (with or without N LV2 backups, all changes since the last lv1 or 0 to the present) 0Compact 1 ~ NOW

2 = cumulative increment since the last backup of any level (since any backup) 0 / 1 / 2 ~ NOW

Note that all backups must be preceded by a level level 0 backup, that is, there must be a level level 0 backup at the beginning, and the full backup cannot be used as a level level 0 backup.

Incremental backup script:

Full library backup:

Run {

Allocate channel c1 type disk

Allocate channel c2 type disk

Allocate channel c3 type disk

Backup full tag 'dbfull' format' / u01Accord oradata Universe backupfull% u% s% p 'database

Include current controlfile

Sql 'alter system archive log current'

Backup filesperset 3 format'/ u01Accord oradata Universe backupchar% u% s% p'

Archivelog all delete input; # backup archiving is optional and can be backed up separately and regularly

Release channel c1

Release channel c2

Release channel c3

}

Level zero backup:

Run {

Allocate channel c1 type disk

Allocate channel c2 type disk

Allocate channel c3 type disk

Backup incremental level 0 tag 'db0' format' / u01Universe oradataAccord backupDb0% u% s% p'

Database skip readonly

Sql 'alter system archive log current'

Backup filesperset 3 format'/ u01Accord oradata Universe backupchar% u% s% p'

Archivelog all delete input; # backup archiving is optional and can be backed up separately and regularly

Release channel c1

Release channel c2

Release channel c3

}

Level 1 backup:

Run {

Allocate channel c1 type disk

Allocate channel c2 type disk

Allocate channel c3 type disk

Backup incremental level 1 tag 'db1' format' / u01Universe oradataPlacement backupDb1% u% s% p'

Database skip readonly

Sql 'alter system archive log current'

Backup filesperset 3 format'/ u01Accord oradata Universe backupchar% u% s% p'

Archivelog all delete input; # backup archiving is optional and can be backed up separately and regularly

Release channel c1

Release channel c2

Release channel c3

}

Cumulative backup script:

The difference from an incremental backup script is at the backup level:

Backup incremental level=0 cumulative

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report