Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2011
    Posts
    87

    Unanswered: DB2 Backup vs Compress backup

    hi,

    DB2 9.7 fp 4 /Win 2008 R2 (8GB RAM / 6 CPU)

    I take daily online database backup (only 1 database, 500GB size) and it takes around 50 minutes.
    It is Unthrottled backup. The backup command i use is :

    BACKUP DATABASE MYDB ONLINE TO X:\DB2BACKUP INCLUDE LOGS WITHOUT PROMPTING;

    As the Database grows faster, I need big disk space to store the backup file.
    So, I use the COMPRESS command to take a backup. But not it takes 3 hours to complete the backup and compredd around 65%.

    Is there any way to speed up the backup (I am looking to do under 2 hours)

    Any suggestions .....

    Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You basically have two choices, either compress or not. Compression takes up less space, but requires more time (more CPU to do the compression). Uncompressed takes up more disk but goes quickly. You need to decide which one is more important.

    Andy

  3. #3
    Join Date
    Jan 2013
    Posts
    15
    The other thought is to not to use the "compress" option of the backup command and to take a normal backup and then compress the backup image using rar/zip.

    If you were on a UNIX variant, I would suggest backing up to named pipes and gziping the backup as per:

    Take an offline backup of MYDB to a named pipe

    In session 1 :
    mkfifo /tmp/backupfifo
    db2 backup db MYDB to /tmp/backupfifo
    sleep 15
    rm /tmp/backupfifo

    In session 2
    gzip < /tmp/backupfifo > /DB2BACKUPS/<dbname>.backup.fifo.gz

    The reasoning for this is that that the above method is faster than using the native compression option in the db2 backup command.

    Cheers,
    Hans

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by UglyBoxer View Post
    the above method is faster than using the native compression option in the db2 backup command.
    ...probably at the price of the compression ratio.
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Nov 2011
    Posts
    87

    Thank you

    Thanks for your comments.

    The CPU usage was less than 50%. Even if I increase another 2 CPUs , i dont think i will see any improvements. (i dont want to waste the resource for backup).

    Anyway...
    I am going to leave with db2 compression. I have to live with extra 2 hours as i cant see better choice.

    Regards,

Posting Permissions

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