Amanda-Users

Re: Ramifications of dump cycle and number of tapes choices

2004-01-12 22:33:51
Subject: Re: Ramifications of dump cycle and number of tapes choices
From: Eric Siegerman <erics AT telepres DOT com>
To: amanda-users AT amanda DOT org
Date: Mon, 12 Jan 2004 22:31:48 -0500
On Mon, Jan 12, 2004 at 06:56:25PM -0600, Fran Fabrizio wrote:
> [Assuming dumpcycle=7, runspercycle=7, runtapes=1, tapecycle=33:]
> Are the following statements correct?
> 
> 1. We will have a full dump of any given partition somewhere on the most
> recent 7 tapes

Yes.  As you've figured out, precisely where is up to Amanda.

> and that to restore a file to any given date in the past
> 7 days

27 days, actually (looking ahead to question #2).  The file might
not be in the most recent dump cycle, but whichever cycle it's in
is still only 7 tapes long...

> would take at most 7 tapes/steps but on average 3.5 tapes/steps.

In your case, I think the numbers are 4 and very roughly 2, resp.

Amanda doesn't always "bump" a given DLE to the next dump level;
whether it does is determined by how much tape it would save by
doing so (see amanda.conf parameters "bumpsize", "bumpmult", and
"bumpdays").

With your parameters, and with the default bumpdays value of 2,
the maximum number of tapes for a restore is 4:
    Day:   1 2 3 4 5 6 7 8
    Level: 0 1 1 2 2 3 3 0

(With bumpdays=1, you'd be right; the maximum would be 7.)

As for the average number of tapes...

The vast majority of DLEs never get above level 1 or 2 in my
experience; their dump histories look more like "0111111011..."
or "011222201112...".  Thus, as an estimate of the average number
of tapes to be read for a restore, (maximum_possible_dumplevel/2)
is on the high side (in your case, max/2 = 2 is pretty close, but
that's purely by accident).

(maximum_actual_dumplevel/2) is probably low; the DLE spends a
lot more days at the maximum dump level than it does climbing up
to it.

There are too many variables, I think, to estimate the average
number of tapes without looking at your actual dump history,
though the two formulas above might serve as *very* rough bounds.

My estimate of 2 for your average is very much
back-of-the-envelope guesswork:
  - for all those DLEs that never get above dump level 1, the
    average is 1.9 ((1 + 2 + 2 + 2 + 2 + 2 + 2) / 7).
  - for the few DLEs that stop at dump level 2, the average
    is 2.4 ((1 + 2 + 2 + 3 + 3 + 3 + 3) / 7), but only
    approximately; the DLE might bump to level 2 later, making
    the average a bit lower
  - for the *very* few DLEs that go to level 3 or above, the
    average will be higher still
  - but the level-1 DLEs outnumber all the rest combined, so 2
    seems as good a guess as any

But then, all of this pseudomathematical blather only applies to
restores of many files (full-DLE disaster recovery, or a
user-requested restore of an entire directory).  For a
single-file restore, you should only to need to read *one* tape.
Amrecover will figure out in advance which tape the desired file
lives on, so it won't need to search the rest.

> 2. We can retrieve a file as it existed on any date in the past 27 days,
> and possibly as it existed on days 28-33

This looks right to me.

> Hence, it seems you are guaranteed to be able to retrieve any
> file as it existed 27 or less days ago.

"Almost guaranteed" :-(  Be aware that in a panic situation, a
full backup can be postponed to a run after the one where it
should have been done ("delayed" is the word Amanda actually
uses).  If that happens, there will come a day or two, a month or
so hence, when you can't quite meet your 27-day guarantee.

Amanda tries hard to avoid delaying full backups, but it can
happen, due to things like tape errors, operator failing to mount
the right tape (shouldn't be an issue for you), tape filling up
before it was expected to, and possibly other circumstances that
aren't coming to mind right now.

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        erics AT telepres DOT com
|  |  /
It must be said that they would have sounded better if the singer
wouldn't throw his fellow band members to the ground and toss the
drum kit around during songs.
        - Patrick Lenneau