当前位置:网站首页>Viewing and verifying backup sets using dmrman
Viewing and verifying backup sets using dmrman
2022-07-06 03:54:00 【Song Xiaorong】
stay DM Restoring and restoring the database , Sometimes, restore fails , At this time, first check and verify the correctness of the database backup set information , Check whether the initialization parameters of the source library and the target library are compatible . We can use DMRMAN View and verify the database backup set .
View the full backup set of the database ( Offline backup )
Use show backupset Statements can be viewed DM Database backup set information , The command reference is as follows (DB_DAMENG_FULL_20200825_111703_293463 For offline full backup sets ):
RMAN>show backupset '/dm8/data/DAMENG/bak/DB_DAMENG_FULL_20200825_111703_293463';
The results are as follows .DBINFO Display database related information , Contains the magic number of the database , Database creation Directory , Database page size 、 Cluster size , Case sensitive 、 Whether the length is in characters 、 Character set 、 Database version 、 Whether to open archiving and other related information .
Be careful : stay DM8 Physical backup restore in progress , If the source database and the target database “ Case sensitive ” and “ Whether the length is in characters ” And other initialization parameter settings are different , Then the source library backup set file cannot be restored in the target library .
META INFO Show the name of the database 、 Backup name 、 Backup range 、 Backup type ( Total quantity / Incremental backup ) And backup methods ( offline / Online backup ) Etc , It can be seen here that the backup scope of this backup set is database backup , The backup type is full backup , The backup method is offline backup , As shown in the figure below :
FILE INFO Show the backup set of the database 、 Backup film and other information . It consists of four parts : Backup slice information <backup_piece_list>、 Data file information <data_file_list>、 Archived log information <arch_file_list>、HUGE Tablespace data file information <huge_file_list>. It can be seen here that the offline backup disk does not contain redo log information , Only data file information ,<data_file_list> Lists the included data file information .
View the full backup set of the database ( Online backup )
Use the following statement to view the database backup set (DB_DAMENG_FULL_2020_08_27_17_59_14 For online full backup sets ):
RMAN>show backupset '/dm8/data/DAMENG/bak/DB_DAMENG_FULL_2020_08_27_17_59_14';
The query results are as follows , It can be seen that , The same database , Online backup and offline backup DBINFO The information is basically the same ( Online backup requires opening the archive , so archive flag by 1).
META INFO in , The backup scope is database backup , The backup method is online backup , As shown in the figure below :
FILE INFO It can be seen that the online backup backup includes data backup and log backup , It includes data file information and part of archive log information .
View the database incremental backup set ( Online backup )
Use the following statement to view the backup set information (DB_DAMENG_INCRE_2020_08_27_16_19_58 Incremental backup sets for online ):
RMAN>show backupset '/dm8/data/DAMENG/bak/DB_DAMENG_INCRE_2020_08_27_16_19_58';
DB INFO Same as online full backup ,META INFO in , The backup scope is displayed as database backup , The backup mode is displayed as online backup , The backup type is incremental , As shown in the figure below :
FILE INFO It can be seen that online incremental backup is the same as online full backup , The backup piece contains data file information and archive log information .
View tablespace backup sets ( Online backup )
Use the following statement to view the backup set (TS_TBS_FULL_2020_08_27_16_20_56 It is online full TBS Tablespace backup sets ):
DMRMAN>show backupset '/dm8/data/DAMENG/bak/TS_TBS_FULL_2020_08_27_16_20_56';
META INFO in , The backup scope is displayed as table space backup , The backup mode is displayed as online full backup , As shown in the figure below .
FILE INFO It can be seen from table space online backup that the backup piece only contains the data file information corresponding to the table space , Do not include redo log information (DM8 When restoring a tablespace, it will automatically restore the tablespace to the latest time according to the archive log ).
View archived backup sets ( Online backup )
Use the following statement to view the backup set information (ARCH_2020_08_27_22_36_47 Archive backup sets online ):
RMAN>show backupset '/dm8/data/DAMENG/bak/ARCH_2020_08_27_22_36_47';
The results are as follows . among ,META INFO The backup range in is displayed as archive backup , The backup mode is displayed as online backup .
FILE INFO It can be seen that the archive backup backup only contains archive log information .<arch_file_list> Archive log file information is listed in .
Verify backup set
Use check backupset Statements can verify DM Database backup set information , The command reference is as follows :
RMAN>check backupset '/dm8/data/DAMENG/bak/DB_DAMENG_FULL_2020_08_27_17_59_14';
The verification backup is successful , Then the backup set is correct .
If the backup piece file in the backup set (.bak file ) Was renamed , Then the backup set verification fails , The following error is the duplicate name of the backup piece file, which leads to the failure of backup set verification :
summary :
①DM The physical backup set of the database contains metadata files and backup slice files .
② The suffix of metadata file is .meta, Through metadata files , You can learn about the entire backup set . The metadata file records the backup piece file name , Therefore, you cannot modify the backup piece file at will (.bak file ) name , If you modify the backup piece file name, the backup set will not find the backup piece file and cannot restore the database .
③ The suffix of backup slice file is .bak, Used to store backup data . The backup slice file contains data backup slice and log backup slice ; The data backup piece is used to store the information of the data page in the data file , The log backup is used to store REDO Log information . Online backup because the database is running , To ensure the consistency of the database , Online backup includes data file information , Also include REDO Log information , Therefore, the online database backup piece includes two parts: data backup piece and log backup piece ( Intuitively speaking, there are two online backup sets .bak file ); While offline backup, because the database is closed , There is no consistency problem , So offline backup only needs to back up data files .
④DM8 Tablespace backup only supports online backup , But only the data files corresponding to the tablespace are backed up , actual DM8 When restoring a tablespace, it will automatically restore the tablespace to the latest state according to the archive log .
边栏推荐
- 《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
- Blue Bridge Cup - Castle formula
- 自动化测试怎么规范部署?
- BUAA magpie nesting
- 判断当天是当月的第几周
- MySQL reads missing data from a table in a continuous period of time
- 3.1 detailed explanation of rtthread serial port device (V1)
- [practical exercise] face location model based on skin color
- Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
- Why do you want to start pointer compression?
猜你喜欢
Schnuka: visual positioning system working principle of visual positioning system
How to standardize the deployment of automated testing?
Proof of Stirling formula
ESP32_ FreeRTOS_ Arduino_ 1_ Create task
Cubemx transplantation punctual atom LCD display routine
Schnuka: 3D vision detection application industry machine vision 3D detection
Record the pit of NETCORE's memory surge
[optimization model] Monte Carlo method of optimization calculation
Security xxE vulnerability recurrence (XXe Lab)
Blue Bridge Cup - day of week
随机推荐
Ybtoj coloring plan [tree chain dissection, segment tree, tarjan]
在字节做测试5年,7月无情被辞,想给划水的兄弟提个醒
多项目编程极简用例
[prediction model] difference method model
three. JS page background animation liquid JS special effect
Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did
判断当天是当月的第几周
Introduction to data types in MySQL
Containerization Foundation
P7735-[noi2021] heavy and heavy edges [tree chain dissection, line segment tree]
The Research Report "2022 RPA supplier strength matrix analysis of China's banking industry" was officially launched
In Net 6 CS more concise method
Redis (replicate dictionary server) cache
[optimization model] Monte Carlo method of optimization calculation
Facebook and other large companies have leaked more than one billion user data, and it is time to pay attention to did
有条件地 [JsonIgnore]
2.2 fonctionnement stm32 GPIO
MySQL about self growth
Flask learning and project practice 8: introduction and use of cookies and sessions
C#(三十)之C#comboBox ListView treeView