Subject Re: [firebird-support] Re: nbackup strategy advice
Author Paul Vinkenoog
Hi Kjell,

> > > If two such days coincide, you still need to run both "colliding" levels
> > > (lower N first, higher N directly afterwards), or the sequence will be
> > > broken next day.
> >
> > That's not necessary, and the higher level backup will add nothing on
> > that moment.
> >
> > Suppose you make a level-2 backup every Sunday. Then it makes sense to
> > schedule the level-3 backups daily from Mon-Sat.
> >
> > If you want to make a point-in-time restore later, it will involve 4 files
> > if that point in time is on Mon-Sat, and 3 files if it is on a Sunday.
> > (And 2 files if it is the first day of the month.)
> >
> > All you have to do is determine the most recent backup before the chosen
> > point in time. If that is a level N, you need N+1 files for the restore
> > (levels 0-N, each one being the most recent file of that level before
> > time 'T').
>
> My idea was to avoid having to keep track of N for last backup. The
> script & scheduling would be a bit simpler. And I do realize the N=1
> backup right after the N=0 backup will store nothing. It will, however,
> make it possible to do the N=2 backup next day and have a complete
> N-chain. Skipping the N=1 backup and go right for N=2 won't work. or am
> I missing something?

No, you're right. A level N backup is always based on the most recent
level (N-1) backup. So, suppose the first of the month is on a Tuesday,
and the level 1 backup is made. Level 2 backups are scheduled every Sunday
and level 3 backups every working day.

In that case, the level 3 backup of Wednesday the 2nd will be based on the
level 2 backup of Sunday the 29th or 30th of the previous month. The most
recent level 1 backup won't be in its restore chain. That's not intrinsically
bad, but it's confusing. So after the monthly level 1, it makes sense to
have it followed immediately by a 'weekly' backup, even if it's the 'wrong'
day of the week.

But the daily backups can start the next day, *unless* there are also hourly
backups scheduled (N=4).

I also realize now that I automatically assumed that nothing happens during
weekends, but of course that depends entirely on the situation.


Kind regards,
Paul Vinkenoog