Solved

TSM Backup problem (daily, weekly, monthly and yearly) with different management classes

Posted on 2009-07-10
13
3,369 Views
Last Modified: 2013-11-17
i have DB server and TSM Server. My OS is AIX
i want to take daily, weekly, monthly and yearly backup of DB automatically on different tape defined in different management classes.
As backup goes to only default class so that has the problem.
please help to define different node name of one client in dsm.sys and dsm.opt and tdpo.opt
0
Comment
Question by:amirs80
  • 7
  • 6
13 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24821997
OK,
 
I see that you're using TDPO, and thus RMAN. With all the retention management policies of RMAN, why do you still want to implement an own backup strategy?
 
Anyway, here is how you could proceed (and it's not quite simple) -

First, you have to create new storage pools as the end targets of your backups, and new management hierarchies.
Values in brackets [ ] indicate existing elements of your domain structure, values in italic indicate example names. Not all needed parameters are mentioned!

DEFINE STGPOOL tdpo_weekly ...
DEFINE MGMTCLASS [domain] [policyset] tdpo_weekly ...
DEFINE COPYGROUP [domain] [policyset] tdpo_weekly STANDARD T=B  DEST=tdpo_weekly ...
REGISTER NODE  tdpo_weekly [passwd] DOM=[domain] ...   (*)
(*) We can work with or without new nodenames. Please let me know which way you'd prefer.

Create a new DSMI configuration, (dsmi_weekly_opt, for example), with

SERVERNAME  tdpo_weekly
...  

Create a new tdpo.opt file (tdpo_weekly.opt, for example), with

TDPO_FS   adsmorc_weekly
DSMI_ORC_CONFIG   [path/to/]dsmi_weekly_opt
TDPO_NODE   tdpo_weekly
...
 
Edit dsm.sys to contain a new server stanza. Copy an existing server definition, and change

SERVERNAME   tdpo_weekly
NODENAME   tdpo_weekly
INCLUDE   /adsmorc_weekly/.../* tdpo_weekly
...
The last entry above changes the management class of the new backups from default to the new one tdpo_weekly, and is the most important thing here!  
Now to RMAN. Run your weekly backups against your new structure by giving it a new channel (the RMAN prompts are only for illustration) -

RMAN> run { allocate channel w1 device type sbt_tape parms "ENV=(TDPO_OPTFILE=[path/to]tdpo_weekly_opt)";
2>          backup database ... ... ...;
3>          }
Note that all RMAN processing dealing with your new backups (including recover/restore, of course) has to be done inside a RUN block, with 'allocate channel ...' as the first command.
I told you it wasn't simple ...
OK, try to get a bit familiar with what I wrote, then come back if needed, so that we can work it out step-by-step.
Good luck!
wmp
0
 
LVL 3

Author Comment

by:amirs80
ID: 24822182
I all know about the procedure, the problem is an examples of dsm.sys, dsm.opt and tdpo.opt

I know that we reqire different management class

As i have configured three management classes daily, weekly and monthly
and the default is daily for oracle backup, the backup is succesfull but when i want to take weekly backup, it also uses the daily management class instead of weekly
further i also do the backup manually by making the weekly management class as default.
but that is manual way.

someone tells me that it requires two node name and different tdpo.opt files
please help in solving the issue

0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24822216
I told you all that above.
What exactly do you want to know?
 
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24822406
You could send me your existing tdpo.opt, dsm.sys and dsm.opt.
I'll post back the new/extended ones.
0
 
LVL 3

Author Comment

by:amirs80
ID: 24829002
dsm.sys:

SErvername  TSMServer
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   TSMServer.abc.com
        PASSWORDAccess generate
        passworddir /home/oracle
        nodename oracledb02

***************************************************************************
dsm.opt

* SErvername       A server name defined in the dsm.sys file
SErvername       TSMServer TSMServer.abc.com

**************************************************************************

tdpo.opt

DSMI_ORC_CONFIG    /usr/tivoli/tsm/client/oracle/bin64/dsm.opt
DSMI_LOG           /var/log/tsmlog/tdpoerror.log

TDPO_FS            orc9_db
*TDPO_NODE          <hostname>
*TDPO_OWNER         oracle
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64

TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1

TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4
****************************************************************************************************

all three files have been posted, please help as i want to take daily, weekly and monthly backup automatically
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24830076
OK,

I think we should take the easier way - without using new nodenames, but with additional filespace names.

The idea behind it is to define these filespace names in additional tdpo.opt files, let them point to additional dsm.opt files, which in turn point to new 'server' entries in dsm.sys. Now, these server entries each contain an INCLUDE statement, which directs backups of the new filespace name (from tdpo.opt) to the new management class.

To run weekly/monthly backups, use the names of the new tdpoxxx.opt files in an ALLOCATE CHANNEL ...command (see below).

After the new backups have run you will see, when doing a "query filespace nodename" on the TSM server, that your TSM node
'oracledb02' will have, additionally to the existing filespace 'orc9_db' two new ones called, if you follow my naming below, 'orc9_weekly' and 'orc9_monthly'.

Following are your new config files. Important and/or new values are in bold.
I assume that you created two new management classes fitting your needs in terms of storage pools, retention policy etc. I'll name those classes weekly_mgmt_class and monthly_mgmt_class, because I don't know the names you gave them.

*************************************************************
Old dsm.sys:
-------------------------------------------------
SErvername  TSMServer
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   TSMServer.abc.com
        PASSWORDAccess generate
        passworddir /home/oracle
        nodename oracledb02
-------------------------------------------------

New dsm.sys:
-------------------------------------------------
SErvername  TSMServer
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   TSMServer.abc.com
        PASSWORDAccess generate
        passworddir /home/oracle
        nodename oracledb02

SErvername  TSM_weekly
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   TSMServer.abc.com
        PASSWORDAccess generate
        passworddir /home/oracle
        nodename oracledb02
   INCLUDE /orc9_weekly/.../*  weekly_mgmt_class

SErvername  TSM_monthly
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   TSMServer.abc.com
        PASSWORDAccess generate
        passworddir /home/oracle
        nodename oracledb02
   INCLUDE /orc9_monthly/.../*  monthly_mgmt_class
-------------------------------------------------
*************************************************************
Present dsm.opt
-------------------------------------------------
* SErvername       A server name defined in the dsm.sys file
SErvername       TSMServer
-------------------------------------------------

Additional file dsm_weekly.opt
-------------------------------------------------
* SErvername       A server name defined in the dsm.sys file
SErvername       TSM_weekly
-------------------------------------------------
Additional file dsm_monthly.opt
-------------------------------------------------
* SErvername       A server name defined in the dsm.sys file
SErvername       TSM_monthly
-------------------------------------------------

*************************************************************

Present tdpo.opt
-------------------------------------------------
DSMI_ORC_CONFIG    /usr/tivoli/tsm/client/oracle/bin64/dsm.opt
DSMI_LOG           /var/log/tsmlog/tdpoerror.log

TDPO_FS            orc9_db
*TDPO_NODE          <hostname>
*TDPO_OWNER         oracle
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64

TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1

TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4
-------------------------------------------------
Additional file tdpo_weekly.opt
-------------------------------------------------
DSMI_ORC_CONFIG    /usr/tivoli/tsm/client/oracle/bin64/dsm_weekly.opt
DSMI_LOG           /var/log/tsmlog/tdpoerror.log

TDPO_FS            orc9_weekly
*TDPO_NODE          <hostname>
*TDPO_OWNER         oracle
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64

TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1

TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4
-------------------------------------------------
Additional file tdpo_monthly.opt
-------------------------------------------------
DSMI_ORC_CONFIG    /usr/tivoli/tsm/client/oracle/bin64/dsm_monthly.opt
DSMI_LOG           /var/log/tsmlog/tdpoerror.log

TDPO_FS            orc9_monthly
*TDPO_NODE          <hostname>
*TDPO_OWNER         oracle
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64

TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1

TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4
-------------------------------------------------
*************************************************************
Run your weekly/monthly backups using your new filespaces by giving it a new channel pointing to the new tdpoxxx.opt files.
The RMAN prompts are only for illustration.
New RMAN weekly backup command:
-------------------------------------------------
RMAN> run { allocate channel w1 device type sbt_tape
2>          parms "ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_weekly.opt)";
3>          backup database ... ... ...;
4>          }
-------------------------------------------------
New RMAN monthly backup command:
-------------------------------------------------
RMAN> run { allocate channel w1 device type sbt_tape
2>          parms "ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_monthly.opt)";
3>          backup database ... ... ...;
4>          }
-------------------------------------------------

Note that all RMAN processing dealing with your new backups (including recover/restore, of course) has to be done inside a RUN block, with 'allocate channel ...' like above as the first command.
*************************************************************

Have fun!

wmp


0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Author Comment

by:amirs80
ID: 24838173
Thanks a lot for the reply and help

But i want to configure it with different nodenames, as it will also help to take the file level backup for different management classes.
As for daily weekly monthly and so on
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 24838282
OK, that's easy.
Just define your new nodes (I'll name them oracle02db_w and oracle02db_m),
and make the two little changes to the new dsm.sys files marked bold below -

*************************************************************
Old dsm.sys:
-------------------------------------------------
SErvername  TSMServer
  COMMMethod         TCPip
  TCPPort            1500
  TCPServeraddress   TSMServer.abc.com
       PASSWORDAccess generate
       passworddir /home/oracle
       nodename oracledb02
-------------------------------------------------
New dsm.sys:
-------------------------------------------------
SErvername  TSMServer
  COMMMethod         TCPip
  TCPPort            1500
  TCPServeraddress   TSMServer.abc.com
       PASSWORDAccess generate
       passworddir /home/oracle
       nodename oracledb02
SErvername  TSM_weekly
  COMMMethod         TCPip
  TCPPort            1500
  TCPServeraddress   TSMServer.abc.com
       PASSWORDAccess generate
       passworddir /home/oracle
       nodename oracledb02_w
 INCLUDE /orc9_weekly/.../*  weekly_mgmt_class
SErvername  TSM_monthly
  COMMMethod         TCPip
  TCPPort            1500
  TCPServeraddress   TSMServer.abc.com
       PASSWORDAccess generate
       passworddir /home/oracle
       nodename oracledb02_m
 INCLUDE /orc9_monthly/.../*  monthly_mgmt_class
-------------------------------------------------
*************************************************************
Present dsm.opt
-------------------------------------------------
* SErvername       A server name defined in the dsm.sys file
SErvername       TSMServer
-------------------------------------------------
Additional file dsm_weekly.opt
-------------------------------------------------
* SErvername       A server name defined in the dsm.sys file
SErvername       TSM_weekly
-------------------------------------------------
Additional file dsm_monthly.opt
-------------------------------------------------
* SErvername       A server name defined in the dsm.sys file
SErvername       TSM_monthly
-------------------------------------------------
*************************************************************
Present tdpo.opt
-------------------------------------------------
DSMI_ORC_CONFIG    /usr/tivoli/tsm/client/oracle/bin64/dsm.opt
DSMI_LOG           /var/log/tsmlog/tdpoerror.log
TDPO_FS            orc9_db
*TDPO_NODE          <hostname>
*TDPO_OWNER         oracle
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64
TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1
TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4
-------------------------------------------------
Additional file tdpo_weekly.opt
-------------------------------------------------
DSMI_ORC_CONFIG    /usr/tivoli/tsm/client/oracle/bin64/dsm_weekly.opt
DSMI_LOG           /var/log/tsmlog/tdpoerror.log
TDPO_FS            orc9_weekly
*TDPO_NODE          <hostname>
*TDPO_OWNER         oracle
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64
TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1
TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4
-------------------------------------------------
Additional file tdpo_monthly.opt
-------------------------------------------------
DSMI_ORC_CONFIG    /usr/tivoli/tsm/client/oracle/bin64/dsm_monthly.opt
DSMI_LOG           /var/log/tsmlog/tdpoerror.log
TDPO_FS            orc9_monthly
*TDPO_NODE          <hostname>
*TDPO_OWNER         oracle
TDPO_PSWDPATH      /usr/tivoli/tsm/client/oracle/bin64
TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1
TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4
-------------------------------------------------
*************************************************************
Run your weekly/monthly backups using your new filespaces by giving it a new channel pointing to the new tdpoxxx.opt files.
The RMAN prompts are only for illustration.
New RMAN weekly backup command:
-------------------------------------------------
RMAN> run { allocate channel w1 device type sbt_tape
2>          parms "ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_weekly.opt)";
3>          backup database ... ... ...;
4>          }
-------------------------------------------------
New RMAN monthly backup command:
-------------------------------------------------
RMAN> run { allocate channel w1 device type sbt_tape
2>          parms "ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_monthly.opt)";
3>          backup database ... ... ...;
4>          }
-------------------------------------------------
 
HTH
wmp

 

 
0
 
LVL 3

Author Comment

by:amirs80
ID: 24838760
but can i use this to take daily, weekly and monthly file level backup as for different management classes.

Suppose i want to take backup of /tmp directory on daily tape, weekly tape and monthly tape, if not then how can?
please mention the way and file configuration

Thanks again  
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24838877
Now we diverge a bit from DB backup, but anyway ...
... two methods -
1) Use the multiple-node version, insert a
INCLUDE /.../* [management_class]
into both of the new dsm.sys and take your file-level backups using
'dsmc Incremental -servername=TSM_weekly /tmp' or 'dsmc Incremental -servername=TSM_monthly /tmp'
2) Create new DOMAIN/POLICYSET/DEFAULT_MGMT_CLASS/COPYGROUP/STGPOOL hierarchies, including nodes belonging to the new domains.
If you enter those nodenames into the new dsm.sys files as in the multiple-node scenario above, (instead of 'INCLUDE /.../*') you can then use the same dsmc statement as above -
'dsmc Incremental -servername=TSM_weekly /tmp'
wmp
0
 
LVL 3

Author Comment

by:amirs80
ID: 24839080
can it be possible with single node name
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24839182
>> But i want to configure it with different nodenames <<
That's what you asked in 24838173 . Are you kidding me?

OK,
 
take the single-node version, as in 24830076 , insert into dsm.sys
INCLUDE /.../* weekly_mgmt_class   under the TSM_weekly server stanza, and
INCLUDE /.../* monthly_mgmt_class   under the TSM_monthly server stanza, and
run your weekly file-level backups using
'dsmc Incremental -servername=TSM_weekly'
and your monthly file-level backups using
'dsmc Incremental -servername=TSM_monthly'
0
 
LVL 3

Author Closing Comment

by:amirs80
ID: 31601968
Thanks a lot for your help
your guidance help me a lot in resolving the problem.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Replication has always been one of those technologies that people run scared from. The main reason is usually cost. When you think of replication, your mind drifts to solutions that replicate from one disk frame to another using block level technolo…
How to update Firmware and Bios in Dell Equalogic PS6000 Arrays and Hard Disks firmware update.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now