DBP - backups/AIX

Anne Stout

DBP - backups/AIX
All,

I am very new to the DB2 LUW environment but know DB2 z/OS very well. I
need to develop a script for AIX to backup and recover an 11 partition DBP
environment to/from disk, can someone provide me an example?

Thank you, in advance, to anyone who can help me!

Anne


______________________________________________________________________

* IDUG 2009 Rome, Italy * 5-9 October * http://IDUG.ORG/Events *
______________________________________________________________________



IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html

Ian Bjorhovde

Re: DBP - backups/AIX
(in response to Anne Stout)
Here's something extremely simple for backup to get you started.


----------- cut here -----------
#!/bin/ksh
#

# Force all connections
db2 force application all

# Back up catalog partition -- assuming it's partition 0
db2_all "<<+0< db2 backup database YOURDB to /a/directory"

# Back all other partitions in parallel -- assuming catalog partition = 0
db2_all "<<-0<; db2 backup database YOURDB to /a/directory"


----------- cut here -----------


This assumes that /a/directory exists on the server where each database
partition lives, and also assumes that you want to write the backups for
each database partition to that same directory.

Say you have a file system designated for backups for each database
partition named /db2/backup0, /db2/backup1, /db2/backup2, ... /db2/backup10.
Let's also assume that your database partitions are 0 through 10 as well). In
this case, you could replace /a/directory from the example above with
/db2/backup\$DB2NODE - as in:

----------- cut here -----------
#!/bin/ksh
#

# Force all connections
db2 force application all

# Back up catalog partition -- assuming it's partition 0
db2_all "<<+0< db2 backup database YOURDB to /db2/backup\$DB2NODE"

# Back all other partitions in parallel -- assuming catalog partition = 0
db2_all "<<-0<; db2 backup database YOURDB to /db2/backup\$DB2NODE"

----------- cut here -----------


There are a million possibilities, so these scripts can get pretty
complex. I have a
fairly intelligent (if I may say so myself) DPF backup/restore script
that's evolved
over the past 10 years to handle a lot.


Good luck,


Ian Bjorhovde




On Sat, Jan 3, 2009 at 1:53 PM, anne Stout <[login to unmask email]> wrote:
> All,
>
> I am very new to the DB2 LUW environment but know DB2 z/OS very well. I
> need to develop a script for AIX to backup and recover an 11 partition DBP
> environment to/from disk, can someone provide me an example?
>
> Thank you, in advance, to anyone who can help me!
>
> Anne
>
>
> ______________________________________________________________________
>
> * IDUG 2009 Rome, Italy * 5-9 October * http://IDUG.ORG/Events *
> ______________________________________________________________________
>
>
>
> IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html
>


______________________________________________________________________

* IDUG 2009 Rome, Italy * 5-9 October * http://IDUG.ORG/Events *
______________________________________________________________________



IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html