how would you restore to a point in time between T3 and T4?
You should restore this way:
- T0 = full backup
- T1 = log backup
- T2 = log backup
- T3 = log backup
- T5 = log backup
I did not understand what you said here:
My understanding is that the full backup at T4 should lead the log
file to mark transactions between T0 and T4 as inactive, so in theory,
the transaction log may no longer contain transactions from the time
before T4.
But this one:
the log backup at T5 will only contain transaction information from
the time after T4.
is INCORRECT.
Every log backup
starts from LSN
where previous log backup
stops, so it doesn't matter if there was or was not any full backup
between T3
and T5
.
You could take a "shortcut" by restoring only T4
and T5
in case the time you are interested in was after T4
, but it's not your case, so you should restore all the log backups
until the last one that covers the time you are interested in, starting from full backup
that precedes the time you are interested.
P.S. May be it can be useful to you to know that the only thing that can "truncate" the log
in full recovery model
is log backup
. Full backup
has nothing to do with "marking transactions inactive".
This article A SQL Server DBA myth a day: (30/30) backup myths may also help.