469,648 Members | 1,331 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

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

Jan 11 '07 #1
9 4252
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?

Jan 11 '07 #2
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?
Jan 11 '07 #3
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
Jan 12 '07 #4
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

Jan 12 '07 #5
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
Jan 12 '07 #6
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

Jan 12 '07 #7
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
Jan 12 '07 #8
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

Jan 15 '07 #9
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
ka******@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
Jan 15 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by dave | last post: by
1 post views Thread by Luc Le Blanc | last post: by
5 posts views Thread by Jim | last post: by
6 posts views Thread by Eric Herber | last post: by
4 posts views Thread by Hardy | last post: by
3 posts views Thread by Anurag | last post: by
10 posts views Thread by Konstantin Andreev | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.