ADSM-L

backing up DB2

2001-08-02 13:32:05
Subject: backing up DB2
From: Gerald Wichmann <gwichmann AT SANSIA DOT COM>
Date: Thu, 2 Aug 2001 10:34:13 -0700
Anyone have a script that they use to backup DB2 cold? I have a linux box
with db2 v7.2 on it and can t seem to enable hot backups because first of
all there are no real linux-specific instructions for how to do so that I
can find, but secondly if I follow the AIX/Solaris instructions I get to
where I have to compile the user exit and of course it fails spectacularly.
It complains about offset_t and several other points in the .c file you
compile.

So I ve resorted to doing cold backups. I wrote a little script that seems
to work but all it really does is

Db2 force application all
Db2 backup database DB1 to /home/db2inst1/db2backup
Db2 backup database DB2 to /home/db2inst1/db2backup
Db2 backup database DB3 to /home/db2inst1/db2backup

Then TSM client comes along and backups up the db2backup directory shortly
thereafter..

I m sure this is incomplete for a number of reasons. First of all right now
it works because hardly anyone uses the applications but I suspect with
larger DB s and more users that while it s backing up DB1 if a user starts
using DB3 it will not be able to backup DB3 as it ll be in use by the time
it gets down to that command. I.e. I think force application all just kicks
applications off DB2 but won t prevent them from reestablishing
connections.. I need to know how to do that.

Secondly when I run this script as a cronjob, it gripes that it can t find
 db2  (the command). If I specify the full path to db2 I get other errors.

All in all my script isn t working.. hope someone can offer some thoughts on
doing this properly..
<Prev in Thread] Current Thread [Next in Thread>
  • backing up DB2, Gerald Wichmann <=