Get the App
SLTechnology News&Howtos  ›  Database  › 

Rman backup level and backup script

Shulou Source: shulou.com Published: 2022-06-01 15:23:36 10月02日 Update

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

Tags: Backups increments content completeness changes scripts levels fundamentals data between that is previous that is siblings basics differences commonly used databases time is in Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple vpn Microsoft MariaDB