If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > writing a compressed db2 backup to a unix directory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-22-08, 03:37
alphasahoo alphasahoo is offline
Registered User
 
Join Date: Feb 2008
Posts: 4
Post writing a compressed db2 backup to a unix directory

Hi All

I am working as a support specialist for GRID MP for GSK.
We are taking up the backup of the database and writing it to a unix directory
using the following command:

su -l $INST -c "db2 backup db $DBNAME ONLINE to $ARCHIVE_PATH"

$INST : db2inst1 (databse schema name)
$DBNAME : UDDB (database name)
$ARCHIVE_PATH : /GWD/appbase/projects/GRIDDB/backup (PATH of directory)

Then we zip the database backup in the above path.
But due to lack of space in the above path,we are not able to do.

So thought of writing the backup in the compressed form directly to the above path i,e the /GWD/appbase/projects/GRIDDB/backup should conatin the zipped backup file.


I tried to use compress option of database backup command to write directly to the path but couldn't do it.

Please help me out with the proper syntax of the compress command.
It will be very helpful if someone will provide me with any example.

I went through the following link
http://www.dbforums.com/t995499.html
and found the syntax but couldn't use in the command .


Please help.


Thanks

Alpha
Reply With Quote
  #2 (permalink)  
Old 02-22-08, 03:54
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
the command is just db2 backup db xx to yy compress or see this link
http://publib.boulder.ibm.com/infoce...c/r0001933.htm
what is the error you get ?
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #3 (permalink)  
Old 02-22-08, 04:43
alphasahoo alphasahoo is offline
Registered User
 
Join Date: Feb 2008
Posts: 4
I gave the folowing command

db2 backup db UDDB ONLINE to /GWD/appbase/projects/GRIDDB/backup compress

But the database backup is getting written to the /GWD/appbase/projects/GRIDDB/backup path But I want the compressed backup to be written in the above path.

Please help
Reply With Quote
  #4 (permalink)  
Old 02-23-08, 01:22
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
The DB2 backup compress option shrinks the backup (compared to not compressed) using a DB2 supplied compression routine. The name of a backup is the same whether it is compressed or uncompressed (using the compress option in the backup command).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 02-25-08, 05:10
alphasahoo alphasahoo is offline
Registered User
 
Join Date: Feb 2008
Posts: 4
Hi All

I am able to produce a compressed db2 backup by using the following command
db2 backup db xx to yy compress

The backup is now of 39 GB whereas the original backup was of 94 GB.
Thanks a lot to all of you for help.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On