当前位置:网站首页>RMAN backup database_ Use RMAN for split mirror backup

RMAN backup database_ Use RMAN for split mirror backup

2022-06-25 18:21:00 Count words and lines

Many sites keep a database backup stored on disk to prevent point in time recovery in case of media failure or incorrect user behavior on the primary database . Data file backup on disk simplifies the restore steps of recovery , Make recovery faster and more reliable .

Warning : Never be online redo Log backup , Split image or other backup methods . Restore Online redo Log backups can lead to the creation of 2 Archive logs with the same serial number but different contents . Again , Best use BACKUP CONTROLFILE Command instead of splitting the image for control file backup .

One way to create a backup of a data file on disk is to use disk mirroring . for example , The operating system can maintain for each file in the database 3 Equivalent copies . In this configuration , You can split a mirrored copy of the database for backup .

RMAN Does not automatically split the mirror , However, split images can be used in backup and recovery . for example ,RMAN You can treat a split image of a data file as a copy of the data file , You can also back up this copy to disk or tape . The steps in this section explain how to use ALTER SYSTEM SUSPEND/RESUME Functionality to do split image backup .

Some mirroring technologies do not require Oracle The database suspends all before the image can be split I/O And as backup . Refer to storage manager , Volume manager or file system documentation to get information about whether it is necessary to suspend from the database instance I/O Information about .

By using SUSPEND/RESUME Do a split image backup of the table space :
1) start-up RMAN, And then use ALTER TABLESPACE … BEGIN BACKUP Statement to put a tablespace into backup mode ( have access to ALTER DATABASE BEGIN BACKUP To put all tablespaces into backup mode ).

for example , Set the table space users Put into backup mode , Connect RMAN Go to the target database and run the following SQL command :
ALTER TABLESPACE users BEGIN BACKUP;

2) If required by the mirroring software or hardware , Suspend the database IO.
ALTER SYSTEM SUSPEND;

3) Split the image of the underlying data file contained in these table spaces .

4) Set the database out of the pending state .
ALTER SYSTEM RESUME;

5) Set the tablespace out of backup mode .
ALTER TABLESPACE users END BACKUP;

have access to ALTER DATABASE END BACKUP To set all tablespaces out of backup mode .

6) Use command CATALOG Register the user managed image copy as the data file copy .
CATALOG DATAFILECOPY ‘/dk2/oradata/trgt/users01.dbf’; #catalog split mirror

7) Back up a copy of the data file .
BACKUP DATAFILECOPY ‘/dk2/oradata/trgt/users01.dbf’;

8) When you are ready to resynchronize the split mirror , Use CHANGE … UNCATALOG Command release in step 6 A copy of the registered data file .
CHANGE DATAFILECOPY ‘/dk2/oradata/trgt/users01.dbf’ UNCATALOG;

9) Resynchronize the image for the affected data file .



source :《Oracle Database Backup and Recovery User’s Guide,19c》

原网站

版权声明
本文为[Count words and lines]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251812221949.html