Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Posts
    207

    Unanswered: Offline vs. Online Backup

    Hey Folks,

    Today I was wondering about the difference between Offline and Online Backups. I problably didnt totally get the difference between those the ways of making backups.

    First of all:

    Is it possible to restore a single a backup? Do i need an offline backup therefore? Once I received an error saying " you need an offline backup to restore your online backup."

    right now i am just backing up by online backup and the disk space gets less.... so i am thinking of removing some elderly backups which where offline backups...

    It is ok to do so? Thanks for your help in advance!

  2. #2
    Join Date
    Jan 2010
    Posts
    335
    Offline Backup -> Users can't connect to database
    Online Backup -> Users can with with database during Backup. With Online Backups you can make Point-in-Time Recovery.


    For Online-Backups you need to activate Archive-Logging. After Activation you need to take a Offline Backup. If you have the Logfiles beloging to the backup you can restore the database from an online backup. In a single partition database the logs are included by default in the Backup, so you should be able to recover the database from an online backup.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by nvk@vhv View Post
    In a single partition database the logs are included by default in the Backup, so you should be able to recover the database from an online backup.
    I don't recall when that became the default, but some people on this forum may be using a version of DB2 where it is not the default, so I would double check that, or just add "include logs" at the end.

    When you take an online backup, and then restore it, you must do a rollforward database in order for the database to be accessable (unless you are creating an HADR standby which remains in rollforward pending state). Typically, one only wants to rollforward to the minimum rollforward time, which can be determined by attempting to rollforward to a date in the past (like one year ago) and DB2 will tell you the minimum rollforward time (just resubmit with new time). Sometimes the noretrive parameter is required to do a minimum rollforward 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

  4. #4
    Join Date
    Jan 2010
    Posts
    207
    First of all - Thank you for replying on my call.

    My backup script on my HADR Primary is:

    BACKUP DATABASE LMDB ONLINE TO "/daten/Backup" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS INCLUDE LOGS WITHOUT PROMPTING;



    So it seems to be all good.

  5. #5
    Join Date
    Jan 2010
    Posts
    335
    Which Version of DB2 do you use?

    Why do you use "WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1"? You are limiting your backup to a single thread.

  6. #6
    Join Date
    Jan 2010
    Posts
    207
    This was suggested by DB2. Not a Problem imo...

  7. #7
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by DB_N00b View Post
    This was suggested by DB2. Not a Problem imo...
    DB2 will automatically use the optiminal values if you don't specify them, so don't.
    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
  •