当前位置:网站首页>DM8 tablespace backup and recovery

DM8 tablespace backup and recovery

2022-07-04 08:12:00 Song Xiaorong

In the production environment , We will formulate various complete backup strategies for the database to ensure the normal operation of the database . For example, the whole database backup 、 Table space backup 、 Logical backup, etc . This article is mainly about DM8 Table space backup and recovery . There are three steps to restore a tablespace backup : Table space backup 、 Tablespace restore 、 Table space recovery .

01

Table space backup

DM8 Tablespaces of must be backed up in online mode . You can use statement backup and management tools for backup :

(1) Back up tablespaces with statements

Sql>backup tablespace test;

You can specify the backup path , If the backup path is not specified , Then the backup is in the default path .

(2) Backup with management tools

[[email protected] dm8] cd /dm8/tool[[email protected] tool] ./manager

View Backup

02

simulation test The tablespace data file is damaged or missing

(1) Delete test The table space corresponds to the data file

[[email protected] dm8]$cd /dm8/data/DAMENG[[email protected] DAMENG]$ rm test01.dbf

(2) Use management tools to view table spaces and corresponding tables

03

Tablespace restore 、 recovery

DM8 Tablespace restore and recovery requires the database to be in offline Execution in mode , So let's use DmServiceDMSERVER Shut down the instance service .

(1) Use dmrman Tools to restore table spaces , recovery ​​​​​​​

[[email protected] bin]$ ./dmrmandmrman V8RMAN> restore database '/dm8/data/DAMENG/dm.ini' tablespace test from backupset '/dm8/data/DAMENG/bak/TS_TEST_FULL_2020_07_10_08_37_27';

RMAN> recover database '/dm8/data/DAMENG/dm.ini' tablespace test;

(2) use console The tool performs table space restore 、 recovery ​​​​​​​

[[email protected] bin]$ cd /dm8/tool/[[email protected] tool]$ ./csonsole

Perform a tablespace restore

Perform tablespace recovery

04

For tablespace data files 、 Verify the data of table

(1) Start database

[[email protected] bin]$ ./DmServiceDMSERVER start

(2) The tablespace data file already exists

(3) Query the data in the table

matters needing attention :

1、  The database must be archived ;

2、DM8 Tablespace backup needs to be performed online ,DM8 Tablespace recovery needs to be performed offline .

原网站

版权声明
本文为[Song Xiaorong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202141504386852.html