If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > backup best practice

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-18-08, 05:28
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
Question backup best practice

Hi,
m using db2 v8.1 ESE on windows.
can anyone tell me what is the best practise to take backups in db2.
Its a production server so need to know if we need to stop any kind services before taking backup.
if any ready scripts available, then plz let me know
Reply With Quote
  #2 (permalink)  
Old 08-18-08, 06:55
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
no scripts - there is no best practice
take as many backup as you can effort
I would recommend online daily backup and archive log files to tape or shared drive. check the book high availability guide in db2 books
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 08-18-08, 11:04
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
It really depends on your environment. Personally, I don't do any backups - but that's because I have a development system only. If you have data that's important to you, you have to make the call between fast recovery and increased disk space usage (backup frequently) and slow recovery (backup less ofter and apply more logs in case of a restore).
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 08-18-08, 11:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
In terms of the actual script that is considered “best practice,” it depends on whether you are taking offline or online backups. Offline are preferred if you have a scheduled maintenance window and you can disconnect all the connections (db2 force application all) while the backup takes place.

For online backups, make sure you use the "include logs" command.

If you submit a backup via the Control Center, you can look at the script with "show SQL" or "show script" (not sure which). This will give you a decent starting point.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 08-19-08, 06:43
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
well m planning to take offline backup on a tape which is on another machine. while taking such backup how do i specify the path of where the tape is. plz let me the exact command if anyone knows.
Reply With Quote
  #6 (permalink)  
Old 08-19-08, 14:28
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by nittal
well m planning to take offline backup on a tape which is on another machine. while taking such backup how do i specify the path of where the tape is. plz let me the exact command if anyone knows.
I don't think you can backup directly to a tape on another machine unless you have some software like TSM or Veritas backup, in which case you should consult the backup software vendor for details.

The easiest, fastest, and safest thing to do is to backup to disk using regular DB2 backup commands, then copy the file on disk to tape.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #7 (permalink)  
Old 08-20-08, 01:03
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
thanks marcus....i was expecting the same kind of straight and simple answer but are u sure that we need another software for the type of backup i am expecting.
Reply With Quote
  #8 (permalink)  
Old 08-20-08, 01:58
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
well we use 'CA BrightStore' software. can this software help fulfill my requirement?
If yes how we actually do that(Commands/ scripts/.....)?
Reply With Quote
  #9 (permalink)  
Old 08-20-08, 11:32
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I have never done a DB2 backup directly to tape, nor do I know anyone who has, mainly because it would take much longer than a backup to disk.

There are backup programs like TSM and others which will put the backup on tape, but it first goes to a disk staging area before it ends up on tape.

If you are using CA BrightStore, then I would check out the manuals for that product or call CA software support.

You would probably be better off just doing the DB2 backup to disk, then use the backup software to backup the image to tape, just like it would backup any other file. You may need to backup your log directories also.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #10 (permalink)  
Old 08-25-08, 06:53
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
ok marcus, thanks once again..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On