DB2 online backup recovery

Source: Internet
Author: User

Sort out the online backup recovery steps

1. Find the database db2 list history backup all for xcldb

2. before the database is damaged, run the db2ckrst command to obtain the recovery sequence. skip this step if the database to be recovered is damaged. db2ckrst-d xcldb-t 20131018111438-r database is useful in Incremental Backup recovery.

3. Check and obtain the information of the backup file db2ckbkp-h C: \ db2bk2 \ XCLDB.0.DB2. node1_.catn1_.20131018111438.001

4. recover databases and log files-use the automatic search method and use the incremental automatic Parameter db2 restore database xcldb incremental automatic from c: \ db2bk2 taken at 20131018111438 logtarget C: \ DB2 \ NODE0000 \ SQL00001 \ SQLOGDIR -- manual recovery is adopted. The difference from automatic recovery is that the command does not have the automatic parameters, and each image needs to be restored one by one. this method is equivalent to Oracle's incremental difference recovery. quite interesting. do not want to detail the column, probably the recovery sequence is as follows: Incremental: Full backup-> Incremental 1-> full backup Detal: difference 2-> full backup-> difference 1-> difference 2

5. after the rollforward restore is executed, you can connect to the database and find that it is still in the ROLL-FORWARD status. -- check the current status of the database db2 rollforward db xcldb query status -- check the backup again, determine the path of the log file db2 list history backup all for xcldb -- copy the archived log after backup to the database directory cp .. /log directory/-- roll forward -- specify the log directory -- db2 rollforward db xcldb to end of logs and complete overflow log path (/db2bak/logs) -- original log directory (recommended) db2 rollforward db xcldb to end of logs and stop -- end ROLL-FORWARD status. the database changes to the normal state. db2 rollforward db xcldb complete or db2 rollforward db xcldb stop -- parameter description: logs and stop: indicates that the last log file is expected to be restored, that is, the moment before the database is damaged.

Tip: -- view the restoration progress db2 list utilities show detail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.