Unix Technical Forum

how to splite db2 backup image in two dirrerent size directory

This is a discussion on how to splite db2 backup image in two dirrerent size directory within the DB2 forums, part of the Database Server Software category; --> Hi, Friends, I have oneconcern on my stragety on db2 backup. My db2 databse backup imdage with size 100G. ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 11:27 AM
george.zhang@lombard.ca
 
Posts: n/a
Default how to splite db2 backup image in two dirrerent size directory

Hi, Friends,
I have oneconcern on my stragety on db2 backup.
My db2 databse backup imdage with size 100G.
On the server, it has two directories which I can use to backup:
directory a with 30 G free spaces
directory b with 90 G free psace
1. Can i use db2 backup db mydatabae to a, b ?
2. If it is OK, how can I make it run automaticly bypassing the prompt
(I am wondering when a is full , it will prompt the following warning
messgae):
Do you want to continue(c), terminate this device only(d), abort
the
utility(t)
? (c/d/t) c
SQL2059W A device full warning was encountered on device "a:\".
Do you want to continue(c), terminate this device only(d), abort
the
utility(t)
? (c/d/t) c

Thanks for your reply

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 11:27 AM
Mark A
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

george.zh...@lombard.ca wrote:
> Hi, Friends,
> I have oneconcern on my stragety on db2 backup.
> My db2 databse backup imdage with size 100G.
> On the server, it has two directories which I can use to backup:
> directory a with 30 G free spaces
> directory b with 90 G free psace
> 1. Can i use db2 backup db mydatabae to a, b ?
> 2. If it is OK, how can I make it run automaticly bypassing the prompt
> (I am wondering when a is full , it will prompt the following warning
> messgae):
> Do you want to continue(c), terminate this device only(d), abort
> the
> utility(t)
> ? (c/d/t) c
> SQL2059W A device full warning was encountered on device "a:\".
> Do you want to continue(c), terminate this device only(d), abort
> the
> utility(t)
> ? (c/d/t) c
>
> Thanks for your reply


Did you try WITHOUT PROMPTING option at the end of backup command?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 11:27 AM
george.zhang@lombard.ca
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

Hi, Mark,
thank you for the reply.
I didn'y try this before.
Now I am in the process of designing a way to backup for that scenario.
First is it possible to split db2 backup imdage with different size
directories. Even one directory is very small. when it is full, db2
will write all the image to the bigger directory with free space. I am
not sure this is OK or not.

thanks,
Mark A wrote:
> george.zh...@lombard.ca wrote:
> > Hi, Friends,
> > I have oneconcern on my stragety on db2 backup.
> > My db2 databse backup imdage with size 100G.
> > On the server, it has two directories which I can use to backup:
> > directory a with 30 G free spaces
> > directory b with 90 G free psace
> > 1. Can i use db2 backup db mydatabae to a, b ?
> > 2. If it is OK, how can I make it run automaticly bypassing the prompt
> > (I am wondering when a is full , it will prompt the following warning
> > messgae):
> > Do you want to continue(c), terminate this device only(d), abort
> > the
> > utility(t)
> > ? (c/d/t) c
> > SQL2059W A device full warning was encountered on device "a:\".
> > Do you want to continue(c), terminate this device only(d), abort
> > the
> > utility(t)
> > ? (c/d/t) c
> >
> > Thanks for your reply

>
> Did you try WITHOUT PROMPTING option at the end of backup command?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 11:28 AM
stefan.albert
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

I have 2 "tricks" for this task:

1) write the backup to a named pipe where you have a reader process
attached which reads the backup stream and writes to the first dir
until it is full and then writes to the next dir... (OK - you'll have
to program a bit...;-)
2) write your backup to 4 files (instead of 2) and put 3 of them in the
dir which is 3 times bigger than the other (and hope that DB2 will
distribute the data well to the 4 locations)


george.zh...@lombard.ca wrote:
> Hi, Friends,
> I have oneconcern on my stragety on db2 backup.
> My db2 databse backup imdage with size 100G.
> On the server, it has two directories which I can use to backup:
> directory a with 30 G free spaces
> directory b with 90 G free psace
> 1. Can i use db2 backup db mydatabae to a, b ?
> 2. If it is OK, how can I make it run automaticly bypassing the prompt
> (I am wondering when a is full , it will prompt the following warning
> messgae):
> Do you want to continue(c), terminate this device only(d), abort
> the
> utility(t)
> ? (c/d/t) c
> SQL2059W A device full warning was encountered on device "a:\".
> Do you want to continue(c), terminate this device only(d), abort
> the
> utility(t)
> ? (c/d/t) c
>
> Thanks for your reply


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 11:28 AM
kavallin@hotmail.com
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

Depending on the version you have, have you tried to do a backup with
compress ?
db2 backup db to .... compress .It will save some disk space to you

/Roger

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 11:28 AM
george.zhang@lombard.ca
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

We use db2 WSE v8.2.5.
How can I calculate the size of the backup image.
I fould it is almost equal to the used size of all the table spaces.
If my db2 version can use compress, how will i get the space size of
the backup with compress before I backup.
Does anyone have the express with WITHOUT PRompt as Mark suggested?
Thanks,
kaval...@hotmail.com wrote:
> Depending on the version you have, have you tried to do a backup with
> compress ?
> db2 backup db to .... compress .It will save some disk space to you
>
> /Roger


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 11:28 AM
kavallin@hotmail.com
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

Ok .. compress is supported in your version and I think that backup
will be approx 5 or 6 times smaller ( I dont remember the exact figures
because it was a long time ago we implemented this in our envm) than
the origin one... try it and you will notice that the backup time and
restore is almost identical with or without compress..
/Roger

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 11:28 AM
george.zhang@lombard.ca
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

Hi, Roger,
Thank you for the tip.
For this stragety, is there any restriction for restore.
I just submit restore with the compress backup image?
Can i restore it to another server (the same OS and db2?
Thanks,
kaval...@hotmail.com wrote:
> Ok .. compress is supported in your version and I think that backup
> will be approx 5 or 6 times smaller ( I dont remember the exact figures
> because it was a long time ago we implemented this in our envm) than
> the origin one... try it and you will notice that the backup time and
> restore is almost identical with or without compress..
> /Roger


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-27-2008, 11:28 AM
kavallin@hotmail.com
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

Hi George...the only thing I can think of is that if you restore a
compressed online backup and included the log files in the backup make
sure that the path for the log files is not in use and use the overflow
log path parameter during the restore ie redirected restore.
/Roger

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-27-2008, 11:28 AM
george.zhang@lombard.ca
 
Posts: n/a
Default Re: how to splite db2 backup image in two dirrerent size directory

Hi, Roger,
Thank you for the reply.
In fact our backup is off line backup. We don't need to log files
restored.
It should be no proble to restore with the backup image of compress.
Thanks again,
George
kavallin@hotmail.com wrote:
> Hi George...the only thing I can think of is that if you restore a
> compressed online backup and included the log files in the backup make
> sure that the path for the log files is not in use and use the overflow
> log path parameter during the restore ie redirected restore.
> /Roger


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com