ADSM-L

R-ing the F M. (and a scripting submission)

2006-03-07 16:22:09
Subject: R-ing the F M. (and a scripting submission)
From: "Allen S. Rout" <asr AT UFL DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 7 Mar 2006 16:21:15 -0500
A few weeks back I talked about doing DB incrementals, and found
guarded optimism in this group about it.  Guarded optimism being about
as exuberant most backup types ever get, I was pleased. :)


But I had a surprise once I started doing the incrementals as a matter
of course.  I had expected (for no good reason) that the
DBBACKUPTRIGGER setting which speaks of number of incrementals between
fulls applied to all DB backup processing.  I was wrong.

Pleasantly, because I'm a paranoid, I noticed this the first day I had
expected my incremental to "automatically" be a full, and have been
noodling with it by hand while I prepare a good automatic response.

So, submitted for your approval or tomatoes, I present Allen's
Do-what-i-meant Backup Script.

---

select num_backup_incr from db where num_backup_incr <= -
  (select numicremental from dbbackuptrigger)

if(rc_ok) goto ok_point

bust_point:
  select 'Full backup starting' from db
  backup db type=full devc=remote_ctrl
  goto done
ok_point:
  select 'incremental backup starting' from db
  backup db devc=remote_ctrl

done:exit

---

Not that it's all that fancy or anything.  If you're at or below the
dbbackuptrigger incremental count, this script will run an incr.  If
you're above tolerance, it will run a full.    It also leaves
breadcrumbs in the log (note those fine 'select' statements) so you
can see what it thought it was doing.

I've taken it through a few cycles on my test server, and am about to
unleash it on the Real World. :)




- Allen S. Rout

<Prev in Thread] Current Thread [Next in Thread>
  • R-ing the F M. (and a scripting submission), Allen S. Rout <=