Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I include logs while taking a backup? OR I have an online database backup image that was taken with the include logs option. How can I restore and only apply the logs stored in this backup image?

0
Posted

Can I include logs while taking a backup? OR I have an online database backup image that was taken with the include logs option. How can I restore and only apply the logs stored in this backup image?

0

While taking backup you can specify the option INCLUDE LOGS. When you specify this option, the backup utility will truncate the currently active log file and copy the necessary set of log extents into the backup image. More information on this here: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/c0011559.htm You will need to create an empty directory and extract the log to this directory during the restore. Then, issue the rollfoward command and point DB2 to this directory using the overflow log path option. Here is an example: > DB2 backup db test1 online include logs Backup successful. The timestamp for this backup image is : 20080318084101 > mkdir rest_logs > DB2 restore db test1 logtarget /home/bkogan/rest_logs 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 ?

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123