DB2使用在线备份和日志恢复到指定时间

使用在线备份和日志恢复到指定时间

查看备份:找到要使用的备份文件

$db2 list history backup all for payment2

 

$ db2 restore database payment2 from /home/db2inst2/payment2_bak taken at 20130531174734

SQL2539W Warning! Restoring to an existing database that is the same as the

backup image database. The database files will be deleted.

Do you want to continue ? (y/n) y

查看归档日志,并使用日志进行恢复

 

db2 "rollforward db payment2 to 2013-06-04-09-00-00.000000 using local time and stop overfiow

log path(/home/db2inst2/log_archive_payment2/db2inst2/PAYMENT2/NODE0000/C0000000)"

 

示例:

 

你可能感兴趣的:(db2)