db2备份数据恢复
例子:db2在周六的时候进行一次全备份,在其他时间进行增量备份,将周三的数据在本地进行恢复的步骤
afx运营各位:
20070207数据库已恢复完毕:数据库验证结果正常
DB2
目标数据:20070207日备份数据(周三)
db2afx20070207_0646.tar.gz
所在服务器:10.4.5.46
数据库名称:db2afxs
文件名称:
另外依赖数据文件:
db2afx20070203_0623.tar.gz
db2afx20070204_0630.tar.gz
db2afx20070205_0600.tar.gz
db2afx20070206_0646.tar.gz
详细过程请见附件:
[db2inst1@fxstest1 20070203-20070209]$ db2 restore db db2afx incremental taken at 20070207064622 into db2afxs logtarget /home/db2inst1/db2afxbackup/backlogs without prompting
SQL2540W Restore is successful, however a warning "2528" was encountered
during Database Restore while processing in No Interrupt mode.
[db2inst1@fxstest1 20070203-20070209]$ db2 restore db db2afx incremental taken at 20070203072053 into db2afxs logtarget /home/db2inst1/db2afxbackup/backlogs without prompting
DB20000I The RESTORE DATABASE command completed successfully.
[db2inst1@fxstest1 20070203-20070209]$ db2 restore db db2afx incremental taken at 20070204063024 into db2afxs logtarget /home/db2inst1/db2afxbackup/backlogs without prompting
SQL2540W Restore is successful, however a warning "2580" was encountered
during Database Restore while processing in No Interrupt mode.
[db2inst1@fxstest1 20070203-20070209]$ db2 restore db db2afx incremental taken at 20070205060011 into db2afxs logtarget /home/db2inst1/db2afxbackup/backlogs without prompting
SQL2540W Restore is successful, however a warning "2580" was encountered
during Database Restore while processing in No Interrupt mode.
[db2inst1@fxstest1 20070203-20070209]$ db2 restore db db2afx incremental taken at 20070206064631 into db2afxs logtarget /home/db2inst1/db2afxbackup/backlogs without prompting
SQL2540W Restore is successful, however a warning "2580" was encountered
during Database Restore while processing in No Interrupt mode.
[db2inst1@fxstest1 20070203-20070209]$ db2 restore db db2afx incremental taken at 20070207064622 into db2afxs logtarget /home/db2inst1/db2afxbackup/backlogs without prompting
SQL2540W Restore is successful, however a warning "2580" was encountered
during Database Restore while processing in No Interrupt mode.
[db2inst1@fxstest1 20070203-20070209]$ db2 "rollforward db db2afxs to end of logs and stop overflow log path(/home/db2inst1/db2afxbackup/backlogs)"
Rollforward Status
Input database alias = db2afxs
Number of nodes have returned status = 1
Node number = 0
Rollforward status = not pending
Next log file to be read =
Log files processed = S0011479.LOG - S0011480.LOG
Last committed transaction = 2007-02-06-21.46.42.000000
DB20000I The ROLLFORWARD command completed successfully.
[db2inst1@fxstest1 20070203-20070209]$ db2 connect to db2afxs
Database Connection Information
Database server = DB2/LINUX 8.2.0
SQL authorization ID = DB2INST1
Local database alias = DB2AFXS
阅读(2519) | 评论(0) | 转发(0) |