A prove for information restoration with 2 schedules that delete information

35 Views Asked by At

What kind of mathematics or technique do I need to use the following?

Just pointing me in the right direction is also helpful as I love mathematics but I am not so good at it.

It's a problem I have at work when taking backups of a database (I tried to generalise it in the question title) :

  • I take a full backup every Sunday
  • I only remove full backups that are older than 2 weeks
  • Only when a backup succeeds then backups older than 2 weeks are deleted

And

  • I take transaction log backups continuously (a transaction log backup is defined below)
  • I only remove log backups that are older than 2 weeks
  • Only when a log backup succeeds then log backups older than 2 weeks are deleted

A transaction log backup is a recording of everything that is changed in the database. This allows the state of the database to be restored to any point in time as long as there are transaction log backups that connect to the last full backup taken after the point in time.

I will explain this with the figure below

enter image description here

a. To restore the database to point t3 we need the full backup at t1 and apply log backups t2,t2 and t3 b. So if we need to restore to point t7 but we don't have full backup t5 we are not able to do the restore to point t7 (Disaster strikes)

My question is how can I prove that a backup is possible to any point in time for the last 2 weeks? Or if that is not the case, what is the minimum time period I can restore to the past and set the parameters so that this minimum is 2 weeks.

I have 2 independently schedules that remove full backup and log backup and my "intuition" says that under some conditions the full backup is deleted just a bit too soon.

What is the best way to model this? (Maybe into something that wolfram alpha understands?)

1

There are 1 best solutions below

0
On

I'm having trouble envisioning what it is you're trying to prove. Is it that no situation occurs where a full backup is deleted before the differential (transaction log) backups that rely on it are also deleted? That certainly sounds possible, so that the backward horizon for the full backups should be extended to at least three weeks.

For instance, suppose that full backups are taken on Sunday the 1st, 8th, 15th, 22nd, and transaction log backups are taken on every other day. Let us consider the situation on Monday the 16th. All backups have been successful, and as a consequence the full backup from Sunday the 1st is deleted. Nevertheless, the transaction log backups from the 2nd through the 7th--all of which rely on that full backup from the 1st--are still around. They cannot be used, so that no state from any earlier than the 8th (the oldest full backup) is recoverable.

If I understand your question correctly.