Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2010
    Posts
    12

    Unanswered: Verify Backups Automatically?

    Coming from MSSQL DB2 is a huge pain in the ass. Im looking to do a backup of an entire database then verify the backup was successful and the bcakup could actually be restored if needed. I have the backup going automatically and i have noted the db2ckbkp and ran it manually on the backup files which it did complete successfully. BUT i need this to run automatically, i see that the Wizard has a notification feature but i need it at least to run a verify automatically and log it somewhere, i can write a script to check that automatically but because of the dynamic names with the database backups i cant find any way to have it check all database backups in a folder even. I have to manually specify the name of the backup in the check. Ive been trying to find a way to do this but DB2 support on the web seems limited. The guides are nice but the functionality of the program to do simple things seems limited. Any help would be appreciated.

    Thanks!

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    What OS are you running? With UNIX/Linux shell scripting, this is not all that difficult, but I don't anything about Windows scripting.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    It is probably as easy to do on Windows, especially having installed GNU tools from GnuWin32, but you can't seriously expect database administrators and server guys to do that, can you? There must be a wizard for that.

  4. #4
    Join Date
    Aug 2010
    Posts
    12
    Windows platform, If someone has a script i can just schedule i can edit it to match my environment. Ive looked for a wizard within DB2 but cannot find one, even the backup option doesnt have a little check box for verify after backup.

  5. #5
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    can anything be wrong with the backup file if backup completed successfully?

    the only problems with backup files I get is when they are ftp'ed from other servers and ftp process was not completed successfully (person who does it does not do checks properly). then i check backup file using db2ckbkp in order to prove them that backup file was damaged in ftp process.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  6. #6
    Join Date
    Aug 2010
    Posts
    12
    You never know, ive had cases where a drive has begun to fail after a backup was completed or it wrote to a bad cluster that was still semi-accessable but then if you tried to do a restore from it it fails. I want to check the file just before we do a file level backup over the network. Jobs have also been known to show successful but obviously did not finish correctly as the backup is only half of the normal size. Just merely need a secondary check to ensure the backup i have is a good one before going through the process of backing it up to another server.
    Last edited by ServerGuy; 08-06-10 at 10:17.

  7. #7
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by ServerGuy View Post
    You never know, ive had cases where a drive has begun to fail after a backup was completed or it wrote to a bad cluster that was still semi-accessable but then if you tried to do a restore from it it fails.
    on what platform? it has never happened on our AIX.

    Quote Originally Posted by ServerGuy View Post
    Jobs have also been known to show successful but obviously did not finish correctly as the backup is only half of the normal size.
    what 'jobs'? do you mean your backup process finished with return code = 0 when it was not really successful? again i never had cases like this on our AIX.
    Last edited by MarkhamDBA; 08-06-10 at 12:10.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  8. #8
    Join Date
    Aug 2010
    Posts
    12
    Windows platform, Server 2008 32bit, Task center showed a task completed successfully, we went to restore the database and it failed on the restore, after looking at the most recent backup and past backups, the most recent one was only half the size of the normal daily backups. Besides if backups always worked properly we wouldnt really need the db2ckbkp command.

    All I'm really looking to do is backup the entire database on our server to the file system, then have the backup verified that it is a functional backup (i.e. can be restored successfully) then let me know in some way that the verify completed successfully. Then using a 3rd party app I want to pull the file that was backed up from the DB2 server to our backup file server. In MSSQL all i do is check a box that says "Verify backup after completion" Is it really this difficult in DB2?

    Also on a side note, the current command we use for backing up the database in question is below, am I correct in thinking that with this command it also packages the logs with the file so that if the entire server fails all we need is this single .001 file?

    BACKUP DATABASE dbname ONLINE TO "F:\DBBackup" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS INCLUDE LOGS WITHOUT PROMPTING;

  9. #9
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I would omit the following parms, since newer versions of DB2 will determine the optimum values for you:
    WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1
    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
  •