1. Use db2ckbkp-h <db_backup_file_name> Check backup files
[Email protected] home]$ db2ckbkp-hdmsdev.0.db2inst.node0000.catn0000.20160513102947.001
=====================media header reached:=====================server database name -- dmsdevserver database alias -- dmsdevclient database alias -- DMSDEVTimestamp -- 20160513102947database partition number -- 0instance -- db2instdatabase configuration type -- 0 (Non-shared data) sequence number -- 1database member id -- 0Release ID -- 0xD00 (db2 v9.7) database seed -- 0x7903558cdb comment ' s codepage (Volume) --0DB Comment (Volume) -- db comment ' s codepage (System) --0DB comment (System) -- Authentication Value -- 255 (not specified) backup mode -- 0 (Offline) includes Logs -- 0 (No) compression -- 0 (uncompressed) backup type -- 0 (Database-level) backup granularity -- 0 (non-incremental) merged backup image -- 0 (No) status flags -- 0x1 consistent onthis membersystem Catalogs in thisimage -- 1 (Yes) catalog partition number -- 0DB Codeset -- utf-8db territory -- logid -- 1458720781LogPath --/ db2data/db2inst/node0000/sql00002/sqlogdir/backup buffer size -- 16781312 (4097 4k pages) number of sessions -- 1platform -- 0x1E (linux-x86-64) the properimage file name would be:DMSDEV.0.db2inst.DBPART000.20160513102947.001 [1] Buffersprocessed: ################################################################################################### ############################################################################################################### ###################### image verification complete - successful.
2. Create a new database
new libraries and backup files DB2CKBKP The check content recovery is consistent
instance -- db2instclient database alias -- dmsdevtimestamp -- 20160513102947DB codeset -- UTF-8LogPath -- /db2data/db2inst/node0000/sql00002/ sqlogdir/
* Strong requirements for attention:
(1) If the name of the instance is not, a new instance shall be created in conformity with it;
(2) To create a new home path consistent with the original user (/db2data)
--Create instance users and fence users
# su-root# useradd-m-gdb2iadm1-d/home/db2inst db2inst# useradd-m-gdb2fadm1-d/home/db2fenc db2fenc# passwd db2ins t# passwd Dbfenc
--Create a new instance with the same name as the original instance
# su-root# cd/opt/ibm/db2/v10.5/instance#/db2icrt-p 50100-u db2fenc db2inst
--Create a new database, consistent with the original database name
# su-db2inst# db2start# db2create database Dmsdev using Codesetutf-8 territory CN
--Change all permissions on the backup file
# su-root# chowndb2inst:db2iadm1/home/dmsdev.0.db2inst.node0000.catn0000.20160513102947.001
--Create the original instance home path
# su-root# mkdir/db2data# Chowndb2inst:db2iadm1/db2data
--Import Full backup files
# su-db2inst# Db2restore Database Dmsdev from/home taken at20160513102947 without rolling forward without prompting
--Administrative permissions for the allocation library
# DB2Connect to dmsdev# db2grant dbadm in database to user DMS
3. Database Configuration Work
(1) Modify the port number of the Db2inst under/etc/service
( 2 ) # Db2setdb2comm=tpcip
(3) # reboot
This article is from the "Wisp Shunyu lock Clear Autumn" blog, please make sure to keep this source http://joeyliu.blog.51cto.com/3647812/1785015
DB2 offline full backup original path recovery