Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2008

    Post Unanswered: 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
    and found the syntax but couldn't use in the command .

    Please help.



  2. #2
    Join Date
    Jun 2006
    the command is just db2 backup db xx to yy compress or see this link
    what is the error you get ?
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  3. #3
    Join Date
    Feb 2008
    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

  4. #4
    Join Date
    May 2003
    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

  5. #5
    Join Date
    Feb 2008
    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.

Posting Permissions

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