473,765 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

db2 standard backup practices

I've been working with db2 8.2fp14 for over a year now and was
wondering what is a "standard" way of doing a backup to provide 24/7
operations with disaster recovery capabilities?
My thoughts were an offline backup once per quarter, followed by a
monthly online backup, followed by daily backups of the logfiles.
BUT it's the details of each that I'm wondering...
1- how can i tell what logfiles need to be backedup? is there a way to
"trim" them without damaging the "disaster recovery" capabilities?
2- when restoring a database to a new server (say test environment or
disaster recover) do i need the offline db restored first, then just
roll into the latest online or should i have all onlines and logfiles
from the offline to to point of recovery?

Two big questions, I know... but I appreciate any help that people can
pass on... Thanks in advance!!

Sep 7 '07 #1
2 3703
On Sep 7, 3:34 pm, clilush <bill.shan...@g mail.comwrote:
I've been working with db2 8.2fp14 for over a year now and was
wondering what is a "standard" way of doing a backup to provide 24/7
operations with disaster recovery capabilities?
My thoughts were an offline backup once per quarter, followed by a
monthly online backup, followed by daily backups of the logfiles.
BUT it's the details of each that I'm wondering...
1- how can i tell what logfiles need to be backedup? is there a way to
"trim" them without damaging the "disaster recovery" capabilities?
2- when restoring a database to a new server (say test environment or
disaster recover) do i need the offline db restored first, then just
roll into the latest online or should i have all onlines and logfiles
from the offline to to point of recovery?

Two big questions, I know... but I appreciate any help that people can
pass on... Thanks in advance!!
Do not randomly chose what backups and how frequently you want it.
Take into consideration the following things.

1. Would be able to afford downtime during the backup? A large
database (600-700GB) might take as much as 4-5 hours (depending on
media) for an offline backup? If no downtime can be afforded, go for
online backup. If only certain day(s) of the week can sustain a
downtime, use a mixture of both online and offline.

2. How frequently? That would depend on your restore strategy. If you
ever needed to restore from a backup image, how fast do you want the
operation to complete. Restoring from an offline backup without
rolling forward is the fastest. More logs to roll-forward = more time
it takes to restore the DB.

3. Log files. If you are performing online backups, you 'll need all
the log files since the backup was taken. If you are using TSM, set
the LOGARCHMETH1 to TSM to automatically archive log files. (IMHO,
this is the best way). You can see the status of automatic log
archiving using the db2pd command with -logs option. If you do not
have TSM, you can backup them up manually. If you want them to be
moved to a specific directory (let's say in Windows) you can set
LOGARCHMETH1 to DISK:D:\Logs. Design your log archive strategy in such
a way that you don't lose any of your logs and they are readily
available during a restore.

4. You can restore a database from any full backup (offline or online)
without having anything to do with any previous full database backups.
You 'll need to be concerned about a previous full backup, only when
you are restoring from a delta or incremental backup image.

5. How do I know which log files are needed for recovery? The minimum
log files needed for a restore from an online backup can be included
in the backup image by using the 'INCLUDE LOGS' option. However, this
will only include log files that would recover your database to a
point of consistency just after the completion of the backup. If you
are trying to restore after a couple of days of the backup was taken,
you 'll need all the logfiles to ensure you don't lose any valuable
data.

Hope this helps.
Cheers,
Sanjuro

Sep 10 '07 #2
On Sep 10, 4:19 pm, Sanjuro <ashru...@gmail .comwrote:
On Sep 7, 3:34 pm, clilush <bill.shan...@g mail.comwrote:
I've been working with db2 8.2fp14 for over a year now and was
wondering what is a "standard" way of doing a backup to provide 24/7
operations with disaster recovery capabilities?
My thoughts were an offline backup once per quarter, followed by a
monthly online backup, followed by daily backups of the logfiles.
BUT it's the details of each that I'm wondering...
1- how can i tell what logfiles need to be backedup? is there a way to
"trim" them without damaging the "disaster recovery" capabilities?
2- when restoring a database to a new server (say test environment or
disaster recover) do i need the offline db restored first, then just
roll into the latest online or should i have all onlines and logfiles
from the offline to to point of recovery?
Two big questions, I know... but I appreciate any help that people can
pass on... Thanks in advance!!

Do not randomly chose what backups and how frequently you want it.
Take into consideration the following things.

1. Would be able to afford downtime during the backup? A large
database (600-700GB) might take as much as 4-5 hours (depending on
media) for an offline backup? If no downtime can be afforded, go for
online backup. If only certain day(s) of the week can sustain a
downtime, use a mixture of both online and offline.

2. How frequently? That would depend on your restore strategy. If you
ever needed to restore from a backup image, how fast do you want the
operation to complete. Restoring from an offline backup without
rolling forward is the fastest. More logs to roll-forward = more time
it takes to restore the DB.

3. Log files. If you are performing online backups, you 'll need all
the log files since the backup was taken. If you are using TSM, set
the LOGARCHMETH1 to TSM to automatically archive log files. (IMHO,
this is the best way). You can see the status of automatic log
archiving using the db2pd command with -logs option. If you do not
have TSM, you can backup them up manually. If you want them to be
moved to a specific directory (let's say in Windows) you can set
LOGARCHMETH1 to DISK:D:\Logs. Design your log archive strategy in such
a way that you don't lose any of your logs and they are readily
available during a restore.

4. You can restore a database from any full backup (offline or online)
without having anything to do with any previous full database backups.
You 'll need to be concerned about a previous full backup, only when
you are restoring from a delta or incremental backup image.

5. How do I know which log files are needed for recovery? The minimum
log files needed for a restore from an online backup can be included
in the backup image by using the 'INCLUDE LOGS' option. However, this
will only include log files that would recover your database to a
point of consistency just after the completion of the backup. If you
are trying to restore after a couple of days of the backup was taken,
you 'll need all the logfiles to ensure you don't lose any valuable
data.

Hope this helps.
Cheers,
Sanjuro
to add my 2 cents worth, I suggest you practice doing the restores, so
that when needed for a real emergency, you are sure you know how to do
it.

Sep 10 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
8330
by: John Bentley | last post by:
John Bentley writes at this level: If we think about our savings accounts then division never comes in (as far as I can see). We deposit and withdraw exact amounts most of the time. Occasionaly we get an interest payment. Unless the bank is cruel to its developers the interest figure will be able to be exactly represented by a computer, something like 4.1% as opposed to 4 1/3 % 125.78 * ' Initial Balance 04.1% -------
2
2109
by: Matt | last post by:
I run SQL Server 2000 and use thier database maintenance plans to backup my databases. My questions is what happens if a change is being made to a database table while a backup is running? Should I be locking the databases before the backup begins? Scenario: 1) Database Plan begins backup at 7:00 PM. 2) At 7:01 PM a web user updates their password while the backup is taking place.
6
3347
by: Eric Herber | last post by:
I've a question regarding db2 (V8.1) and database backups going to a storage manager like TSM for example. As I can see in the storage manager if I backup the complete database over the TSM API (no tablespace backups) the backup images is stored as a single backup object. Later I will be able to restore the complete database from this image and I will also be able to restore single tablespaces from this backup image as long as I...
9
4069
by: Alexander Cohen | last post by:
(sorry for the double post if there is one - i sent the mail to the lisyt from the wrong address) Hi, Im passing this in the commmand line to start up the PostgreSQL server: ../pg_ctl start -w -D /Volumes/GROUCH\ 2/Database3 but its always giving me this error:
3
8941
by: Jeff S | last post by:
Just wondering if it's standard practice to make DAL classes STATIC (in a Windows Forms). Doing so would make sense to me because DAL methods are typically called quite frequently - certainly the case for DAL "Helper" classes - plus DAL objects/classes generally maintain no state. Seems like a good case for STATIC classes to me. It has been recommended to me to put the entire DAL, into a separate .DLL. Is that standard practice too? ...
50
4738
by: Konrad Palczynski | last post by:
I am looking for tool to validate conformity to defined coding standard. I have already found Parasoft's C++ Test, but it is quite expensive. Is there any Open Source alternative? I do not need GUI, fancy reports nor predefined sets of rules.
2
1312
by: mr_doles | last post by:
I am writing a Database application using Visual Studio 2005 and SQL Server Express 2005. I am trying to create a back up and year end back up plan within the program. The folder structure I want is as follows: The main level is c:\program files\app name\database with the following subfolders, 1) current - holds the current db (db.mdf), 2) backup - holds the backed up databases (db1.bak) and 3) archive - holds the year end...
21
2841
by: Kannan | last post by:
Its been a while I have done pure C programming (I was coding in C++). Is the following function valid according to standard C? int main(int argc, char *argv) { int x; x = 9; printf("Value of x is: %d\n", x);
7
4963
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already developed significant content for the C programming language that is available at: https://www.securecoding.cert.org/ by clicking on the "CERT C Programming Language Secure Coding Standard"
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.