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 > Is there a way to compress db2 backup files as they are created?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-30-03, 16:42
markmull45 markmull45 is offline
Registered User
 
Join Date: Dec 2003
Posts: 3
Is there a way to compress db2 backup files as they are created?

Is there a way to compress db2 backup files as they are created? I am working on a server with limited space. If there is a way to code a db2 backup to /directory/path command so that the files being created are compressed dynamically while they are created, I would like to know how to write that script code.

Thanks
Reply With Quote
  #2 (permalink)  
Old 12-30-03, 17:54
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: Is there a way to compress db2 backup files as they are created?

You haven't told what version of DB2 you are on or your platform ..

If you are on V8.1.4 LUW, there is an option to compress the backup image in the BACKUP Command

If you are later than V7.2 FP5 (I remember this is when backup to pipe was supported, please check FP release notes ), you can backup to pipe and compress the image ... But remember, this will take longer than the usual backup

HTH

Sathyaram

Quote:
Originally posted by markmull45
Is there a way to compress db2 backup files as they are created? I am working on a server with limited space. If there is a way to code a db2 backup to /directory/path command so that the files being created are compressed dynamically while they are created, I would like to know how to write that script code.

Thanks
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 12-30-03, 18:01
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
The compress option can be used on the command line (v8 FP4), but is not yet part of the Backup executed from the Control Center.
__________________
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
  #4 (permalink)  
Old 12-30-03, 19:12
markmull45 markmull45 is offline
Registered User
 
Join Date: Dec 2003
Posts: 3
We are not on version 8 yet. Are there other options?

We are not on version 8 yet. Are there other options?
Reply With Quote
  #5 (permalink)  
Old 12-30-03, 19:22
markmull45 markmull45 is offline
Registered User
 
Join Date: Dec 2003
Posts: 3
Re: Is there a way to compress db2 backup files as they are created?

Quote:
Originally posted by sathyaram_s
You haven't told what version of DB2 you are on or your platform ..

If you are on V8.1.4 LUW, there is an option to compress the backup image in the BACKUP Command

If you are later than V7.2 FP5 (I remember this is when backup to pipe was supported, please check FP release notes ), you can backup to pipe and compress the image ... But remember, this will take longer than the usual backup

HTH

Sathyaram
We are on version 7 of DB2.

The operating system is Unix.

Do you have an example of how to get a named pipe to work. I have tried and think I am running into syntax problems or perhaps this is much slower than I would have thought.

Thanks
Reply With Quote
  #6 (permalink)  
Old 01-16-04, 14:15
garypannone garypannone is offline
Registered User
 
Join Date: Jan 2004
Posts: 2
Hello... have you found the fixpak documentation (or otherwise) that details how to do this? I have just completed developing a disk-disk backup / restore script and on-the-fly compression of the backup file is the last piece I need to implement... would rather not reinvent the wheel if something is out there already!

Thanks
Reply With Quote
  #7 (permalink)  
Old 01-16-04, 14:28
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Go here: http://publib.boulder.ibm.com/infoce...help/index.jsp

Search on "compress", select the "93% Compressed backup" (second item found).

Then select the BACKUP DATABASE item.
__________________
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
  #8 (permalink)  
Old 01-16-04, 17:48
garypannone garypannone is offline
Registered User
 
Join Date: Jan 2004
Posts: 2
ahhh yes... I had found that one already... that's the version 8 method which is really simple. I was actually speaking about the version 7 method of using a named pipe with compress all inside of a shell script... just got it working myself! Thanks for the reply
Reply With Quote
  #9 (permalink)  
Old 01-17-04, 16:49
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
Does anybody knows what is the compression ratio? I use gzip utility to zip the backup image and the final image is almost one third of original one. But obviously it does take longer as it is a seperate step.

dollar

Quote:
Originally posted by garypannone
ahhh yes... I had found that one already... that's the version 8 method which is really simple. I was actually speaking about the version 7 method of using a named pipe with compress all inside of a shell script... just got it working myself! Thanks for the reply
Reply With Quote
  #10 (permalink)  
Old 01-17-04, 17:07
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
The amount of compression depends heavily on the data in the tables. The only way is to compare both compression methods is by using the exact same data.
__________________
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
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