Networker

Re: [Networker] how to keep exactly 2*N days of backups at all times?

2005-05-17 14:31:15
Subject: Re: [Networker] how to keep exactly 2*N days of backups at all times?
From: Tim Mooney <mooney AT DOGBERT.CC.NDSU.NODAK DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 17 May 2005 13:22:52 -0500
In regard to: Re: [Networker] how to keep exactly 2*N days of backups at...:

In regard to: Re: [Networker] how to keep exactly 2*N days of backups at...:

Sounds like your bosses want the mail spool to be purged every 14
days.  In that case, why do backups at all?  Just put the storage on a
NetApp and setup N*2 nightly snapshots.  They'll get deleted
automatically and you won't have to hassle with tapes.

You have correctly guessed why they've asked for exactly X number of days.
We already have a significant SAN infrastructure and our mail spools are
distributed over multiple hosts, so I don't think adding a NetApp device
to the mix is going to be an option (no matter how perfectly it would
accomplish what they're looking for).

More to the point then, you may need to have 2*N volumes.  You can't
erase data from the beginning of a tape.  You can only mark it expired.
Recovery from a 'recyclable' tape is pretty easy.  It's only after the
volume is relabled that it's difficult.

You're correct, and I have anticipated this.

I already have a script to mark volumes (by pool or name) full if they
have any savesets on them newer than time T.  We run our groups from
a cron-scheduled script, so before the group in question kicks off, I'll
grab the time since the epoch and save it in a variable.

After the group finishes, I'll run my script and pass it the time I
grabbed before the group ran.  My script will mark the volume(s) that
just got written to as "full".  This will allow me to segregate the
savesets from each nights' backups onto different volumes.  That will
ensure that I don't have backups from multiple nights written to one
volume (which would increase the required retention time of the volume).

I'm planning on doing weekly fulls and nightly level 5s (or 1s or
whatever, it makes no difference as every night will be the same
differential level) on the non-full nights.  If I want to cut down
the number of tapes used by this scheme, I could use one pool for
fulls + indexes and a separate pool for differentials + indexes.  If
I do that and one night's differential for all the hosts fits on a
single volume, I would need at max 3 volumes in that pool.

Right now I'm not too concerned about tape use, so I'll probably start
with just use one pool and the script to mark each night's volume(s) full,
and see how that goes.

As an in-between measure, you could also delete the media index for the
older backups.  Then the data is still on the tape, but it becomes more
difficult to quickly restore.  (You'd need to either scan the tapes or
recover an older bootstrap)

That's an interesting idea, and thanks for pointing it out.  I don't
think I'll go that route, though.  ;-)

I have confirmed with management that keeping 2 weeks + the weekly full
that the oldest differential depends on will be satisfactory, so I'll
proceed with that plan.

Ah, cool.  Never mind then.  Of course you may still want to consider
what exactly happens the day the full expires.  It may continue to be
easily recoverable for months, depending on your tape rotation scheme.

:-)  I've anticipated that too.  I also have a script that can be used
to recycle and relabel (by pool or volume name) any volume(s) that is/are
eligible for recycling.  It's basically just a smart, powerful wrapper
around nsrjb with the `-R' option.

Running this script on a daily basis will ensure that a volume is recycled
and relabeled (almost) as soon as it's eligible.  That will prevent a
recyclable volume from hanging around for weeks or months until NetWorker
decides its time has come.

As always, I appreciate your comments and insights.

Tim
--
Tim Mooney                              mooney AT dogbert.cc.ndsu.NoDak DOT edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listserv.temple DOT edu or visit the list's Web site at
http://listserv.temple.edu/archives/networker.html where you can
also view and post messages to the list. Questions regarding this list
should be sent to stan AT temple DOT edu
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=