• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

How to backup DB2

randyman

ADSM.ORG Member
#4
I don't know much at all DB2...I'm struggling with this...can anyone give me a little more guidance. Am I only installing the baclient? Is there no TDP to install and configure?
 

randyman

ADSM.ORG Member
#6
What am I missing here? I've followed the instructions in the doc. How do you configure the db2 for a nightly backup? Do I need a seperate TSM node, scheduler service, schedule to kick off a command etc?
 

Harry_Redl

Moderator
ADSM.ORG Moderator
#7
Hi,

when your DB2 is configured, you can create a script containing something like:

db2 backup db <DBNAME> use tsm

Then define a schedule with action type "command" and use the script as an object.

Harry
 

randyman

ADSM.ORG Member
#9
Does anyone have the script/command file that they use to backup their db2 dabases that they would like to share? Much thanks!

I'm struggling to get it to work. here's what I've come up with so far. We use circular logging.

set logfile="C:\program files\tivoli\tsm\api\db2full.log"

echo ==================================================== >> %logfile%
echo DB2 Server Name: SETL200_DB2 >> %logfile%
echo %date% %time% >> %logfile%

echo ======= Performing online backup of databases ======= >> %logfile%

REM # xmeta DB backup
echo ======= xmeta DB backup =======>> %logfile%
db2 backup database xmeta use tsm >> %logfile%

REM # iadb backup
echo ======= iadb BACKUP =======>> %logfile%
db2 backup database iadb use tsm >> %logfile%

REM # Perform TSM backup of DB2 transaction logs

REM xmeta Transaction Logs
echo ======= Transaction Log Backup for xmeta ======= >> %logfile%
echo ======= c:\progra~1\tivoli\tsm\baclient\dsmc incr D:\DB2\NODE0000\SQL00001\SQLOGDIR\ >> %logfile%
c:\progra~1\tivoli\tsm\baclient\dsmc incr D:\DB2\NODE0000\SQL00001\SQLOGDIR\ >> %logfile%

REM iadb Transaction Logs
echo ======= Transaction Log Backup for iadb ======= >> %logfile%
echo ======= c:\progra~1\tivoli\tsm\baclient\dsmc incr D:\DB2\NODE0000\SQL00002\SQLOGDIR\ >> %logfile%
c:\progra~1\tivoli\tsm\baclient\dsmc incr D:\DB2\NODE0000\SQL00002\SQLOGDIR\ >> %logfile%

REM # Delete any backups older than 14 days
echo ======= Delete any backups older than 14 days >> %logfile%
db2adutl delete full older than 14 days without prompting database xmeta >> %logfile%
db2adutl delete full older than 14 days without prompting database iadb >> %logfile%

echo ======= End of process =======>> %logfile%
 

randyman

ADSM.ORG Member
#10
To get it "working", I use that losely, I added the "db2 force application all" at the begining of the above script to force all applications off the databases.

Here's my issues now:

1. When I try to backup the transaction logs using the script I get the following error: ANS0101E Unable to open English message repository 'dscenu.txt'. - I have put the file in the api directory and there is one in the baclient directory....????

2. I get this warning in my log:
Warning: There are no file spaces created by DB2 on the TSM server
Warning: No DB2 backup images found in TSM for any alias.
- When checking the backup using the db2util query command, I get the same thing. ????

Any help would be appreciated.
 

Mita201

ADSM.ORG Senior Member
#11
for the error, try to cd into directory before runing command, inside script.
For db2 backup, to have this script work, you need to put your databases in archive logging mode, or you need to quiesce database before backup, and do "offline" backup.
I am not very sure what is the point of backing up open transaction log files, but maybe this is ok, I do not know.
What else you can do, if your database is in archive log mode, you can point your archive logs to have primary location going directly to TSM.
 

tsm_dude

ADSM.ORG Senior Member
#12
did you set the password to the same as node password with dsmapipw ?
usually I update db cfg for db and set ARCHLOGMETHOD1 to TSM, this puts DB into rollforward mode, then stop db2,do a full offline backup, start db2 and online backups are now possible.
Just get it working manually prior to your script ;
become db2 admin user
db2
backup db mydb online use tsm include logs

(also your logs will archive into TSM automatically when the log dirs get a certain number of logs written)
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 17 19.5%
  • Keep using TSM for Spectrum Protect.

    Votes: 53 60.9%
  • Let's be formal and just say Spectrum Protect

    Votes: 10 11.5%
  • Other (please comement)

    Votes: 7 8.0%

Forum statistics

Threads
31,471
Messages
134,133
Members
21,569
Latest member
srinathkodela
Top