Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2003
    Posts
    3

    Unanswered: 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

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    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

    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.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  4. #4
    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?

  5. #5
    Join Date
    Dec 2003
    Posts
    3

    Re: Is there a way to compress db2 backup files as they are created?

    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

  6. #6
    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

  7. #7
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  8. #8
    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

  9. #9
    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

    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

  10. #10
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •