g***@bilumina.com
2016-04-21 07:43:55 UTC
Hi!
Using DB2 Express-C 10.5 with fixpack 5 on Ubuntu server 12.04.5 64-bit.
Every night I do online backup like this:
db2 backup db MYDB online to /home/db2inst1/backup compress include logs
db2 connect to MYDB
FIRST_ACTIVE_LOG=$(db2 get db cfg for MYDB | grep "First active log file" | awk '{print $6}')
db2 prune logfile prior to $FIRST_ACTIVE_LOG
db2 disconnect current
Is this OK or will I get some data loss between backup and prune? By data loss I mean missing transactional logs, so when I do a restore (taking last backup and all remaining transactional logs) I will not get data up to 5 minutes ago (for example)?
Best regards,
Kovi
Using DB2 Express-C 10.5 with fixpack 5 on Ubuntu server 12.04.5 64-bit.
Every night I do online backup like this:
db2 backup db MYDB online to /home/db2inst1/backup compress include logs
db2 connect to MYDB
FIRST_ACTIVE_LOG=$(db2 get db cfg for MYDB | grep "First active log file" | awk '{print $6}')
db2 prune logfile prior to $FIRST_ACTIVE_LOG
db2 disconnect current
Is this OK or will I get some data loss between backup and prune? By data loss I mean missing transactional logs, so when I do a restore (taking last backup and all remaining transactional logs) I will not get data up to 5 minutes ago (for example)?
Best regards,
Kovi